2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【ShellScript】Gitへのプッシュが面倒なのでシェルスクリプトを書いた話

Last updated at Posted at 2019-06-21

めんどくさいのが嫌いなので、楽をする為に作りました。
シェルスクリプトの実行一発でpush完了です。

前提

・編集をローカルブランチでやって、masterにpushする。
・ステージングからコミットまではVScodeのGUIでやります。楽だし間違えにくいので。

実際のコード

gitPush.sh
git push origin local_branch

git checkout master
git pull
git cherry-pick local_branch
git push origin master

git checkout local_branch
git merge master
git push origin local_branch

注意

local_branchってのが自分の作業用に切ったブランチの名称です。
多分git merge masterでメッセージの入力を求められるので、qで抜けてください。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?