0

I'm not very good with git and I'm having a problem. I am currently on local branch A-1 which I cloned from the remote branch A-1. But someone else pushed changes to the remote develop branch which I now need on my local A-1. How do I get the changes from the remote develop branch on to my local A-1 branch?

I've been looking around for answers and I think I need to use git pull but I think I also need to specify the remote branch that I want to pull from? Otherwise I think it will just pull from the remote A-1 branch?

From Update a local branch with the changes from a tracked remote branch, would I need just do

git pull origin develop?

Mark
  • 3,138
  • 5
  • 19
  • 36
  • You can do `git rebase origin/develop` or `git merge origin/develop`, whatever suit you most. `rebase` and `merge` are powerful concepts in git, find a good book to get handy with it. – Tarek Dakhran Mar 12 '20 at 21:49
  • @Tarek Dakhran, thanks, can you explain a little more on what ```git merge origin/deveop``` is doing? I'll read up on it in the mean time too. Thank you. I just want to make sure that it doesn't merge my local ```A-1``` changes into ```develop``` – Mark Mar 12 '20 at 21:53
  • 1
    It is opposite, it will merge `origin/develop` into your local branch. For example `git pull` is same as `git merge origin/A-1`. – Tarek Dakhran Mar 12 '20 at 21:56

0 Answers0