Last active
August 29, 2015 13:56
-
-
Save pinzolo/8994594 to your computer and use it in GitHub Desktop.
git コマンドの tips というか一度調べたやつgit branch -m 変更後の名前
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 間違えて git rm したファイルを復活させる | |
git reset HEAD hoge/hoge.rb # キャッシュ上で復活 | |
git checkout hoge/hoge.rb # ファイルの取り出し | |
# 現在のブランチ名の変更 | |
git branch -m dest_branch_name | |
# 特定のブランチ名の変更 | |
git branch -m src_branch_name dest_branch_name | |
# コミット間で変更のあったファイル一覧 | |
git diff --stat <commit-from> <commit-to> | |
# 現在との比較なら | |
git diff --stat <commit> | |
# リモートブランチを削除(空をプッシュする) | |
git push origin :target-branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment