Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将远程跟踪分支的分支指针重置为其先前的提交之一,所以看起来我没有拉(类似于本地分支的硬重置)?
您可以使用以下命令设置对任何其他提交的引用:
git update-ref refs/remotes/origin/master <commit-sha1 or tag>
这将使远程分支origin/master指向您指定的提交。
origin/master