Skip to content

Instantly share code, notes, and snippets.

@tkatochin
Last active February 8, 2016 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkatochin/f5bcffa8d5afd523fb8b to your computer and use it in GitHub Desktop.
Save tkatochin/f5bcffa8d5afd523fb8b to your computer and use it in GitHub Desktop.
強制push
#!/bin/sh
git push origin `git rev-parse --abbrev-ref HEAD` -f
@tkatochin
Copy link
Author

よく考えたら、もともとブランチ名省略すれば、今のブランチが使われるじゃん?
いらねー。超いらねーコードだ。

@tkatochin
Copy link
Author

そんなことはなかった。
git config --global push.default current
という設定をしていなければ全ブランチになっちゃうから、設定によらない安全な方法だと思う。

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