How do I fast-forward other tracking branches in git? -
we working model of single remote repository of use. branch new features , reintegrate trunk branch. our workflow should integrate trunk our working branches when other features integrated trunk.
as such, it's not uncommon do:
(branch) $ git commit -a -m"blah blah blah" (branch) $ git fetch # origin/trunk updated (branch) $ git checkout trunk (trunk) $ git pull # trunk fast-forwarded current version of origin/trunk. (trunk) $ git checkout branch (branch) $ git merge trunk (branch) $ git push
i don't "git checkout trunk/git pull/git checkout branch" cycle. it's combined visual studio complaining files , projects have changed on disk, , should reload them. both checkouts. , pull. , merge. merge unavoidable, because of how git works, should able fast-forward on trunk without needing check out.
but don't know command, , google-foo has failed me on this. know how?
do need update local trunk
branch?
just fetch origin/trunk
, merge
directly in branch working on.
, mark longair's advice: git: fetch
, merge
, don’t pull
.
oliver mentions in his answer (upvoted):
git fetch upstream trunk:trunk
as he comments:
you can skip merge , fast-forward, using one-liner.
it fast-forward local branch trunk
remote branch's head.
see more @ "git: update local branch without checking out?"
Comments
Post a Comment