以下の内容はhttps://blog.sushi.money/entry/20100730/1280498857より取得しました。


git current-branchっていうaliasを考えた

Gitで,いまどのブランチにいるか確認してコピーなどすることがよくあるので,aliasを作った.
~/.gitconfigの[alias]に以下を追加する.

current-branch = "!sh -c \"git branch | grep '*' | awk '{ print \\$2 }' \""


git current-branchすると,いまcheckoutしてるブランチを表示する.

% git checkout master
Switched to branch 'master'
% git current-branch
master
% git checkout kurukuru
Switched to branch 'kurukuru'
% git current-branch
kurukuru
%

今いるブランチをpullとかできる.

% git current-branch | xargs git pull origin



以上の内容はhttps://blog.sushi.money/entry/20100730/1280498857より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14