threads / discuss / 41153

git pull --rebase --autostash

Subject: git pull --rebase --autostash

## tl;dr

2 messages between Jan 8, 2016 and Jan 11, 2016.

replies: 1people: 2as markdown or json

Federico Bond· Jan 8, 2016, 15:24 UTC · lore
Hi,

I was looking through the changes in 2.7 and learned about the very useful autostash feature of git rebase which was present since git 1.8.4.

I was wondering if there has been discussion about adding the same flag(s) for use with git pull --rebase. It seems odd that git pull --rebase honors the rebase.autostash config setting but there is no way to override it with a flag.

If you are OK with this, I can work on a patch to add --[no-]autostash to git pull.

Thanks,
Federico Bond
Jeff King· Jan 11, 2016, 21:03 UTC · re: Federico Bond · lore

Re: git pull --rebase --autostash

On Fri, Jan 08, 2016 at 12:24:09PM -0300, Federico Bond wrote:
Show 11 quoted lines
> I was looking through the changes in 2.7 and learned about the very
> useful autostash feature of git rebase which was present since git
> 1.8.4.
> 
> I was wondering if there has been discussion about adding the same
> flag(s) for use with git pull --rebase. It seems odd that git pull
> --rebase honors the rebase.autostash config setting but there is no
> way to override it with a flag.
> 
> If you are OK with this, I can work on a patch to add --[no-]autostash
> to git pull.

I don't use either feature myself, but I agree that we generally like to have matching command line flags to countermand config options.

I seem to recall another thread recently where somebody wanted to pass an option to rebase via "git pull", but I can't seem to dig it up just now. Having a generic way to pass such options seems like it could be useful, though (e.g., "--keep-empty" might be useful).

-Peff

← back to recent threads