git svn rebase Command - Autostash Option Does Not Exist

54 views
Skip to first unread message

Şahin Kasap

unread,
Nov 4, 2022, 10:27:46 AM11/4/22
to git-for-windows
Hello,
In git svn documentation 2.38.1 (https://git-scm.com/docs/git-svn/2.38.1 ), for git svn rebase, it is said that
- This accepts all options that git svn fetch and git rebase accept
But it doesn't accept autostash option. This means that we have to git stash before rebase and git stash pop after rebase.

Is this a bug, or can we update documentation accordingly?

Thanks in advance, have a nice day.

Johannes Schindelin

unread,
Nov 18, 2022, 3:26:03 AM11/18/22
to Şahin Kasap, git-for-windows
Hi Şahin,

On Fri, 4 Nov 2022, Şahin Kasap wrote:

> Hello,
> In git svn documentation 2.38.1 (https://git-scm.com/docs/git-svn/2.38.1 ),
> for git svn rebase, it is said that
> - This accepts all options that git svn fetch and git rebase accept
> But it doesn't accept *autostash *option. This means that we have to git
> stash before rebase and git stash pop after rebase.
>
> Is this a bug, or can we update documentation accordingly?

I strongly recommend to take it to the Git mailing list
(g...@vger.kernel.org, send plain-text messages, HTML messages are dropped
silently), as it really is not specific to Windows.

Ciao,
Johannes

Konstantin Khomoutov

unread,
Nov 18, 2022, 5:27:40 AM11/18/22
to Şahin Kasap, git-for-windows
On Fri, Nov 18, 2022 at 09:25:58AM +0100, Johannes Schindelin wrote:

> > In git svn documentation 2.38.1 (https://git-scm.com/docs/git-svn/2.38.1 ),
> > for git svn rebase, it is said that
> > - This accepts all options that git svn fetch and git rebase accept
> > But it doesn't accept *autostash *option. This means that we have to git
> > stash before rebase and git stash pop after rebase.
> >
> > Is this a bug, or can we update documentation accordingly?

Let me digress a bit.

If you need such an option, I would propose to reconsider this aspect of your
approach: the stash was invented as a means to "clear the deck" in a case of
emergency - a model case is your boss crashing in while you're in a middle of
a coding streak, demanding you to immediately fix a bug or something like
this. So, you stash whatever changes there are, switch to a required branch
and start working on that emergency task.

Rebasing is not an emergency situation: in all the cases I can think of, it's
a planned activity, and so you can just create a temporary commit out of your
changes, rebase the normal way and chop that commit off the tip of the rebased
branch using

git reset HEAD~

(the changes will remain in the work tree).

Şahin Kasap

unread,
Nov 18, 2022, 7:25:42 AM11/18/22
to Konstantin Khomoutov, git-for-windows
The main was "git pull" equivalence of git svn. The only way to pull from svn is git svn rebase. But this requires stashing, because it is kinda rebase. But it is hard to write 
git stash
git svn rebase
git stash pop
I thought git svn rebase --autostash would be a workaround. 
Thanks for your reply, I really appreciate it.

Reply all
Reply to author
Forward
0 new messages