git fetch vs pull (need full merge syntax) -
so i've read plenty of answers on already, saying pull = fetch + merge. i'm not totally convinced. morning instead of doing "git pull" update code everyone's changes, did "git fetch," , ran "git merge" resulted in bunch of errors. actually, "git merge" didn't work on own. i'm on origin/develop branch, did "git merge origin develop" , gave me several errors (which didn't save, unfortunately).
so, exact syntax should've used?
you should've used git merge @{u}
. @{u}
shorthand remote tracking branch (e.g., origin/master
). looks might working branch called develop
, equivalent: git merge origin/develop
.
i can't remember if pull
ask provide message actual merge--in case cannot fast-forward. so, full command might more akin git merge --no-edit @{u}
.
Comments
Post a Comment