簡體   English   中英

撤消git push to branch master

[英]Undo git push to branch master

我做錯了,我在分支開發上工作,但是我對分支大師做了一個git推送。 我該怎么撤消? 謝謝!

git push origin c45f349cedfc1df51300a8ebb964088c305f2567:master
WARNING

Any access or any attempt to access this machine without permission is forbidden
and could be subject to criminal and civil penalties.

To protect this system from unauthorised use, viruses and to ensure that the
system is functioning properly, security systems have been installed.

Any unauthorised attempt to stop or bypass one of these security tools is
forbidden.

ATTENTION

Tout acces ou tentative d'acces non autorisee sur ce systeme est interdit
et sujet a des poursuites penales ou civiles.

Pour proteger ce systeme des acces frauduleux et des virus, et pour assurer son
bon fonctionnement, des systemes de securites ont ete installes.

Toute tentative non autorisee pour arreter ou contourner l'un de ces
dispositifs est interdite.
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (10/10), 1.78 KiB | 0 bytes/s, done.
Total 10 (delta 7), reused 0 (delta 0)
To git@git.oad.exch.int:optiq/message-bus.git
   0ca786a..c45f349  c45f349cedfc1df51300a8ebb964088c305f2567 -> master
  1. 結帳要掌握

git checkout master

  1. 查看主最后提交

git log --oneline

  1. 重置為上次提交

git reset --hard lastcommit

  1. 強迫原始主人

git push -f origin master:master

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM