# download the latest commits
git remote update -p
# update the local branch
git merge --ff-only @{u}
# if the above fails with a complaint that the local branch has
# diverged:
git rebase -p @{u}
It allows you to pass the -p (--preserve-merges) option to git rebase in case you need to rebase an intentional merge (e.g., merge of an already-pushed feature branch into master).
Shorthand: git up instead of git pull
To make it easy to do the above, I recommend creating an alias called up:
是啊,看起来有点麻烦,换树枝,拉树枝什么的。但是如果您查看 rebase doc,他们会警告不要在共享分支中使用它。因此,最终创建相同的 X 分支,然后 git 获取原点 development 和 git rebase source/development,但是仍然需要将重新基于的 X 分支合并回共享分支 development,所以工作量是相同的。