使用 git 如何合并已经合并的存储库?
我有一个已提取更改的存储库,因此现在它已与远程存储库保持同步。只是现在我意识到我需要提取所有存储库更改并且不保留我的任何更改。我想回顾历史,这样当我拉动时我就不会得到“已经是最新的”。还有第二部分,我怎样才能拉动并获取他们的所有更改而不保留我的更改?
I have a repository that i pulled the changes for, so now it is up to date with the remote repository. Except that now i realized that i needed to pull all of that repositories changes and keep none of mine. I want to go back in history so that i won't get an "Already up-to-date" when i pull. Also part two, how can i pull and get all of their changes keeping none of mine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设:您位于要移动的分支上,远程称为原点,并且您确实想清除所有提交。
git reset
移动分支指针。该命令只是将其从当前位置取出并将其放置在遥控器的分支指针处,同时更改所有工作副本文件。Assumes: You are on the branch you want to move, the remote is called origin, and you really want to blow away all of your commits.
git reset
moves branch pointers around. This command simply plucks it from its current location and places it at the remotes' branch pointer, while changing all of the working copy files.