32
22

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 5 years have passed since last update.

【Git】 rebaseするときにいちいちstashしなくてもよくなる autostash設定

Posted at

rebaseするときに、いちいちstashするの面倒

rebaseするときにいちいちstashするの面倒だなーと思って調べていたら、以下のようなコマンドがあるようです。

$ git rebase <branch> --autostash

また、autostashを常にしたい場合は

$ git config --global rebase.autostash true 

で毎回のrebase操作で自動でstashしてくれるようになります。

これで、Git pullするときに $ git stash$ git pull``````$ git stash popから解放されそうです。

また、autostashをtrueにした状態の時に自動でstashしたくない場合は、

$ git rebase <branch> --no-autostash

とするといけます。

メモ程度にまとめておきました。

参考

32
22
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
32
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?