【发布时间】:2010-11-27 01:01:12
【问题描述】:
假设我有一个功能分支,我在将更改推回之前将上游更改合并到其中:
git branch feature1
... [edit my code]
... [commit]
git fetch origin master
git merge fetch_head [or rebase]
... [resolve conflicts]
... [build and test code]
此时我希望推动我的更改。这样做的正常方法是:
git checkout master [changes a bunch of working tree files]
git merge feature1 [changes the same files right back]
这很好用,但会使(日期检查)编译器认为一大堆文件是脏的,即使内容相同,也需要重新构建。在这种情况下,有没有一种方法可以让工作树保持不变?
类似:
git checkout master --merge-branch feature1
编辑:
我只是在谈论根据定义不会改变文件状态的快进合并。
【问题讨论】:
标签: git