我在 Git 中有以下信息:
# Your branch and 'origin/master' have diverged,
# and have 3 and 8 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
我想要丢弃本地的三个提交,然后拉取远程的八个提交到 origin/master。
(合并会太困难,我宁愿在主分支更新后再重新进行三个本地提交。)
我该如何做到这一点?
git reset origin/master
而不加上--hard
吗?这样工作目录的更改就不会丢失。 - wisbucky