Referencing the child of a commit in Git

后端 未结 10 1131
失恋的感觉
失恋的感觉 2020-11-28 08:37

If you want to move the HEAD to the parent of the current HEAD, that\'s easy:

git reset --hard HEAD^

But is there

10条回答
  •  悲哀的现实
    2020-11-28 09:14

    It is strictly not possible to give a good answer -- since git is distributed, most of the children of the commit you ask about might be in repositories that you don't have on your local machine! That's of course a silly answer, but something to think about. Git rarely implements operations that it can't implement correctly.

提交回复
热议问题