场景:本地回购,在我离开办公室之前
$ hg status
M important/update1
M another/important/update2
M work/in/progress我想提交并推送important/update1和important/update2,,因为我想在回家后将这些文件拖到本地回购处。我还没准备好提交work/in/progress.事实上,它甚至不能正确地解析。该文件在我的IDE中打开,我只想保持原样。
现在我做了:(匆忙地,电车在三分钟后离开)
$ hg commit important/update1 another/important/update2
$ hg push
pushing to https://**censored**
searching for changes
abort: push creates new remote heads on branch 'default'!
(did you forget to merge? use push -f to force)好的。同事推动了一些事情..。(电车两分钟后出发.)
$ hg pull (really important update!)
$ hg update
abort: outstanding uncommitted changes废话。我需要同事的更新,但我不会提交work/in/progress,,更不用说推动它了!我错过了电车..。
你怎么处理这件事?
发布于 2011-01-14 22:19:55
使用阁楼延伸暂时搁置/保存正在进行的工作。
发布于 2012-05-01 19:16:10
如果不想使用搁置,只需使用3个命令即可:
hg diff > mylocalchanges.txt
hg revert -a
# Do your merge here, once you are done, import back your local mods
hg import --no-commit mylocalchanges.txt发布于 2011-01-15 00:37:18
我通常使用TortoiseHg搁置扩展,您也可以激活它在cmdline上使用:
[extensions]
tortoisehg.util.hgshelve =现在您可以使用以下命令:
$ hg shelve如果您知道更新不会干扰我们的工作,也可以强制拉/更新(hg pull -f)。
https://stackoverflow.com/questions/4696466
复制相似问题