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

[RFC PATCH 0/3] Starting rebase from dirty tree

From
SSSimon Sasburg <simon.sasburg@gmail.com>
Date
Nov 1, 2007, 21:30 UTC
Message-ID
<1193952624-608-1-git-send-email-Simon.Sasburg@gmail.com>
These patches allow a --dirty option for git-rebase, git-rebase--interactive, and git-svn rebase.

When --dirty is given, starting from a dirty tree state will be allowed. The difference between HEAD and the index and between the index and the working tree will be committed, these commits will be undone when the rebase is completed.

For me the most often used use case is git-svn rebase one, which i use often. This prevents me form having to commit+reset or stash+unstash everytime i want to do this in a dirty tree.

I recently saw some discussion about a stash-based patch to do the same thing, and decided to share this. These patches are a bit rough in some places, and mostly meant to see what others think if this way of doing this.

One advantage above using stash is that merge conflicts will be presented to the user in the same way as when doing a normal rebase. Also having to explicitly ask for this behaviour with --dirty will hopefully give the user some clue that this isn't a standard operation.

But, in the rebase--interactive case, it allows the user to shoot himself in the foot by re-ordering the commits such that the temporary ones aren't at the end anymore.
Well, comments are welcome :-)
Next: Simon Sasburg
Message 1 of 8 in “Starting rebase from dirty tree”
  1. 0/3 Starting rebase from dirty treeSimon Sasburg, Nov 1, 2007
  2. 1/3 Introduce --dirty option to git-rebase, allowing you to start from a dirty state.Simon Sasburg, Nov 1, 2007
  3. 2/3 Implement --dirty for git-rebase--interactive.Simon Sasburg, Nov 1, 2007
  4. 3/3 Make git-svn rebase --dirty pass along --dirty to git-rebase.Simon Sasburg, Nov 1, 2007
  5. Junio C HamanoNov 12, 2007
  6. Junio C HamanoNov 1, 2007
  7. Junio C HamanoNov 1, 2007
  8. Shawn O. PearceNov 2, 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.