Bunun nedeni, birleştirmek istediğiniz şubenin yerel kopyasının güncel olmamasıdır. Şubem var, aradım MyBranchve birleştirmek istiyorum ProjectMaster.
_>git status
On branch MyBranch-Issue2
Your branch is up-to-date with 'origin/MyBranch-Issue2'.
nothing to commit, working tree clean
_>git merge ProjectMaster
Already up-to-date.
Ancak birleştirilmesi gereken değişiklikler olduğunu biliyorum !
İşte yazdığım zaman git merge ProjectMastergit , bu şubenin güncel olmayan yerel şubeme bakar . Durumun böyle olup olmadığını görmek için önce Git'e şubelerimin güncel olup olmadığını kontrol etmesini ve görmesini ve eğer varsa, uh, kullanarak herhangi bir değişiklik getirmesini söylerim fetch. Sonra orada neler olduğunu görmek için birleştirmek istiyorum şubeye atlıyorum ...
_>git fetch origin
_>git checkout ProjectMaster
Switched to branch ProjectMaster
**Your branch is behind 'origin/ProjectMaster' by 85 commits, and can be fast-forwarded.**
(use "git pull" to update your local branch)
Ah-ha! Yerel kopyam 85 komisyon tarafından bayat, bu her şeyi açıklıyor! Şimdi, Pulleksik olduğum değişiklikleri aşağıya indiriyorum, sonra atlayıp MyBranchtekrar birleştirmeyi deneyin.
_>git pull
Updating 669f825..5b49912
Fast-forward
_>git checkout MyBranch-Issue2
Switched to branch MyBranch-Issue2
Your branch is up-to-date with 'origin/MyBranch-Issue2'.
_>git merge ProjectMaster
Auto-merging Runbooks/File1.ps1
CONFLICT (content): Merge conflict in Runbooks/Runbooks/File1.ps1
Automatic merge failed; fix conflicts and then commit the result.
Ve şimdi düzeltmem gereken bir sorun daha var ...