学んだことをなぐり書き


便利コマンド

コマンド説明参考URL
git reset --hard ORIG_HEADpull, merge の度に HEAD を残すhttp://projects.tsuntsun.net/~nabeken/diary/Sysadm...
git checkout <ブランチ名> ファイル名削除したファイルの復元http://uyota.asablo.jp/blog/2008/08/10/3683692
git log -p <Abranch名>..<Bbranch名> ファイルパスブランチ間の差分を表示してくれるhttp://labs.timedia.co.jp/2011/03/git-list-commits...
git diff --cachedadd してコミットする前の diff を見ることが出来る
git merge --squash BRANCHブランチ差分をひとまとめにして merge してくれるhttp://tech.bayashi.jp/archives/entry/0800_dev/201...
git rebase -i HEAD~nコミットをひとまとめにするhttp://labs.timedia.co.jp/2010/11/git-squash-commi...
git branch -t <ブランチ名> remotes/origin/<ブランチ名>リモートブランチを持ってきて新しいブランチを作る
git tag -a <tag名> -m 'コメント'タグを付けるhttp://progit.org/book/ja/ch2-11.html
git push <リモート名> <tag名>リモートにtagをpushする
git reflogなくしたコミットを探すhttp://subtech.g.hatena.ne.jp/secondlife/20090629/...
git cherry-pickあるコミットだけをブランチに取り込むhttp://d.hatena.ne.jp/idesaku/20091230/1262159267

メンバーのみ編集できます