拡張子により git の振る舞いを変更させる方法
ホームディレクトリもしくはワークディレクトリのルートに .gitattributes を設置する。
|
1 |
git log --grep <word> |
|
1 |
$ git log --grep "#1234" |
|
1 |
$ git log --all --grep "GPIO" |
|
1 |
$ git log -i --grep "code" |
|
1 |
$ git log -E --grep "c..e" |
|
1 |
$ git log -S"ErrorLog" |
|
1 |
git log --author <username> |
※ 部分一致可
※ author : 元々の編集作業を行ったユーザー。cherry-pick や rebaseの元(オリジナル)となるコミットを作ったユーザー。
|
1 |
git log --committer <username> |
※ 部分一致可
※ committer : コミットを作ったユーザー。編集作業をコミットとして反映したユーザー。
git commit でコミットを作ったときは author = committer となる。git commit --amend でコミットを作った(書き換えた)ときは author はそのまま。 committer は書き換えられる。git cherry-pick や git rebase でコミットを作ったときは author は元のコミットを踏襲する。 committer は書き換えられる。tigにおいて以下の警告(warning)が表示される。
|
1 2 |
tig warning: /usr/local/etc/tigrc:90: status-untracked-dirs has been renamed to status-show-untracked-dirs tig warning: Errors while loading /usr/local/etc/tigrc. |
|
1 |
$ git log 69bac23..87ded2d |
コミット 69bac23 は、範囲に含まれ『ない』
|
1 2 3 |
$ git checkout -b branch_xxx $ git push origin branch_xxx |
|
1 |
$ vim <file> |
|
1 |
$ git add <file> |
|
1 |
$ git commit --amend |
CocoaPodsをつかっていて、pod setupの処理が遅い(いつまで経っても終わらない)
|
1 2 3 4 5 6 7 8 9 10 |
$ git status On branch develop Your branch is up-to-date with 'origin/develop'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: mySubModule (new commits) no changes added to commit (use "git add" and/or "git commit -a") |
gitの最新の履歴から数世代だけ遡って取り出す
git push や、その前段に実行される git gc --auto で発生するメモリ不足(out of memory)を回避する方法