git
git addの対話モードを使うと、修正単位でファイルをステージできます。 まとめて修正しちゃったけど、コミットを分けたいときに便利。 git add -p [file] y # ステージする n # ステージしない
.git/hooks/pre-pushを作成 #!/bin/bash bundle exec rake spec if $? -eq 1 ; then exit 1 fi exit 0 chmod a+x .git/hooks/pre-push
git config --global core.excludesfile ~/.gitexcludes 僕はIntelliJ IDEAを利用しているので、IDEAの管理ファイルは除外しておきたい。 でも、プロジェクトの.gitignoreに書いてpull requestする勇気もない。 そんなときにこの設定が僕に手を差し伸べてく…
あとで調べる gitで便利なエイリアス達 - Qiita gitで便利なエイリアス達 - Qiita
bash で git コマンドのブランチ名などを補完するには - Qiita bash で git コマンドのブランチ名などを補完するには - Qiita
git diff master <local_branch_name></local_branch_name>
branch -d <local_branch_name></local_branch_name>
git checkout -b <local_branch_name> origin/<remote_branch_name></remote_branch_name></local_branch_name>
git reset HEAD foo.txt git addの取り消しと、コミット済みのファイルを除外する方法 - kanonjiの日記
# リモートリポジトリから持ってくる git fetch # masterを更新 git checkout master git pull origin master # 対象ブランチに戻ってくる git checkout <branch> # 対象ブランチをリモートから拾う(他の人の作業がある場合などの対策) git pull origin <branch> # ログを</branch></branch>…