Merging without changing the working directory

后端 未结 6 1819
北海茫月
北海茫月 2020-12-03 07:36

I have the following scenario:

* ab82147 (HEAD, topic) changes
* 8993636 changes
* 82f4426 changes
* 18be5a3 (master) first

I\'d like to me

6条回答
  •  没有蜡笔的小新
    2020-12-03 08:15

    The simplest way I can think of would be to git clone to a separate working copy, do the merge there, then git pull back. The pull will then be a fast forward and should only affect files which really have changed.

    Of course, with such a large project making temporary clones isn't ideal, and needs a fair chunk of extra hard disk space. The time cost of the extra clone can be minimised (in the long term) by keeping your merging-copy around, as long as you don't need the disk space.

    Disclaimer: I haven't verified that this works. I believe it should though (git doesn't version file timestamps)

提交回复
热议问题