简体   繁体   中英

Someone removed a commit from remote repo after I pulled it, how do I keep it locally on the next git pull?

Someone removed a commit from the remote repository after I had done a git pull.

Locally I now have these commits:

$ git log --oneline
a7f2d6a commit x
29087ce commit y
8a851c8 commit z

But a7f2d6a commit x was removed from the remote repository. What do I have to do so that the next git pull doesn't remove it from my local commits? I would like to further push it back to the remote repo after I do some more work.

好吧,您可以在包含提交的分支上创建一个分支,然后将其合并到原始分支

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM