git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 foof

That'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.
Previous: Shawn O. PearceNext: David Kastrup
Message 8 of 10 in “Mod. gitk to support REBASE (with stash support).”
  1. Mod. gitk to support REBASE (with stash support).Alexandre Bourget, Aug 8, 2007
  2. Peter BaumannAug 8, 2007
  3. Johannes SchindelinAug 8, 2007
  4. David KastrupAug 8, 2007
  5. Shawn O. PearceAug 9, 2007
  6. David KastrupAug 9, 2007
  7. Shawn O. PearceAug 9, 2007
  8. Shawn O. PearceAug 9, 2007
  9. David KastrupAug 9, 2007
  10. Junio C HamanoAug 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.