Re: [PATCH] Mod. gitk to support REBASE (with stash support).
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 9, 2007, 07:21 UTC
- Message-ID
- <20070809072147.GD24573@spearce.org>
- In-Reply-To
- <20070809065810.GC24573@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> wrote:
Show 6 quoted lines
> David Kastrup <dak@gnu.org> wrote: > > other than on the current HEAD. No diff, no file view, no rebase, > > nothing. > > So your assertion that git-gui only works with one commit, HEAD, > is wrong.
Oh, and git-gui has some features that don't even really exist in the shell porcelain. E.g. you can do this all from the Branch->Create dialog in git-gui:
b=refs/heads/branch-to-create
git fetch origin foof:refs/remotes/origin/foof &&
if test git show-ref $b
then
git push . refs/remotes/origin/foof:$b
else
git branch $b refs/remotes/origin/foof
fi &&
git checkout foofThat's actually somewhat hard to do on the command line, but as it turns out is just insanely handy to have for some workflows. It amounts to "Always fetch the remote tracking branch, make sure my local branch will fast-forward to it, do so, then checkout my local branch; but if the local branch doesn't exist create it, then do the checkout anyway".
I used git-push above just because its handy to do the fast-forward check and update if successful; that's not what git-gui uses internally because its actually a really stupid abuse of the push command. But it was shorter to write out the shell code for this email. Wow, OK, I just spent more time explaining why I used git-push than to just write the damn fast-forward test. Whatever.
I count 1-2 commits in that operation, depending on if your local branch exists or not. Oh, and this nifty thing called a remote.
But you are correct to some extent, there's no diff of a prior commit available from within git-gui. Or rebase. I'd like to fix both. But its time for sleep instead. Oh, and I'm supposed to be fixing some "features" of fast-import this week too...
-- Shawn.