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,050 points
465 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,440 points
365 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,440 points
398 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 761 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,310 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,218 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
21,463 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
3,506 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