Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2867

仕事の始まりと終わりのショートカット(Git)

$
0
0
ふだん、ショートカットが手癖になっているので、その中身(~/.bashrcのaliasの一部)を記録しておく。 みんな大好きdocker-composeのエイリアスはdc。 ~/.bashrc alias dc='docker-compose' 仕事はじめは gstart で、リモートリポジトリから最新を引っ張ってきて、今日の日付でcheckoutして、dockerのお仕事用コンテナをupする。一番はじめのgit checkoutは念の為のおまじない。 ~/.bashrc alias gstart='git checkout target;git pull origin target;git checkout -b test-`date +%Y%m%d`;dc up -d' 仕事の終わりはgend。gitマージして、その日のブランチのcommitコメント編集モードに入る。 ~/.bashrc alias gend='git checkout target;git merge --squash test-`date +%Y%m%d`;git commit' 仕事の終わりの流れはこんな感じ。(テストを全部通して、gendしたら、リモートリポジトリにpushする。←じつはテスト全部通しはたまに忘れていきなりgendに入るのでいましめのために書いて置く)。 ~/dev dc exec {lang} test... gend git push origin target お疲れさまでした。

Viewing all articles
Browse latest Browse all 2867

Trending Articles