Skip to content

Instantly share code, notes, and snippets.

@nantekkotai
Created May 29, 2012 02:49
Show Gist options
  • Save nantekkotai/2822233 to your computer and use it in GitHub Desktop.
Save nantekkotai/2822233 to your computer and use it in GitHub Desktop.
間違ってgit pushしちゃったどうしよう〜

間違えてgit pushしちゃいました〜☆

まずそいつを殴りましょう。
次に、正しい位置までoriginを戻します。

例えば、masterの abcdefg123 の位置まで戻したかったらこうする。

$ git push -f origin abcdefg123:master

これでoriginは元通り復帰しました。

完了の暁に犯人をもう一発殴った上、締めてください。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment