Git merge origin / branch binding to branch branch

What is the difference between when I combine origin/branchXin branchYand combine branchXin branchY?

+4
source share
2 answers

origin/branchX- This is a branch of remote tracking and receives updates from a remote repository every time you run git fetch. On the other hand, branchXis your local version of this thread. branchXmay not be synchronized with origin/branchX, which, in turn, may not be synchronized with what is actually located in the remote repository.

, branchX. branchX branchY, :

git fetch origin          # update remote tracking branchX
git checkout branchY      # switch to branchY
git merge origin/branchX  # merge

branchX , :

git checkout branchX
git pull origin branchX
git checkout branchY
git merge branchX

branchX branchY, . , , , branchX , branchY. :

git checkout branchY
git merge branchX
+5

- , , ( , )

, , , , , .

         -*-*-* branchX 
*-*-*-*-/-*-*-*-*-* Origin/branchX 

, , , - 5 , .

+1

All Articles