Git fetch remote branch

0 votes

I am my co-worker are working on the same repo but in a different branch that is for different projects. But my colleague wants to pull a branch specifically, How do we do that actually? 
Git cloning the repo doesn't seem to work. When I created the branch, I did -b checkout. Does that affect the result with git cloning?

$ git branch -r
origin/HEAD -> origin/master
origin/daves_branch
origin/discover
origin/master

$ git fetch origin discover
$ git checkout discover

I executed these commands but didn't seem to work. What I want to do is to check out the branch and then commit back.

May 14, 2022 in Git & GitHub by Kichu
• 19,040 points
667 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Git & GitHub

+1 vote
1 answer

How to check out a remote Git branch?

Hi@akhtar, You can use the git checkout command ...READ MORE

answered Nov 21, 2020 in Git & GitHub by MD
• 95,460 points
539 views
+1 vote
1 answer

How to create a remote Git branch?

Hi@akhtar, The easiest way is to create one ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,460 points
609 views
–1 vote
1 answer

Having problem in Github and remote Git repo with production and development code

I think you could start with this. The ...READ MORE

answered Apr 10, 2018 in Git & GitHub by shubham
• 7,340 points

edited Dec 15, 2023 by Khan Sarfaraz 1,116 views
0 votes
1 answer

Git pull vs Git Fetch

The objective of both these commands is ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,450 points
1,641 views
0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,890 points
2,456 views
0 votes
3 answers

difference between git remote and git clone

HI.... GIT REMOTE add just creates an entry in ...READ MORE

answered Jul 11, 2020 in Git & GitHub by anonymous
23,434 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP