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

Re: git-rebase skips automatically no more needed commits

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 6, 2011, 17:09 UTC
Message-ID
<7v1uvta97o.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAC9WiBg9+30NjO+NKXVdBiWjR-HU2689JQqVY7Rk5+DM7MiNBg@mail.gmail.com>
Francis Moreau <francis.moro@gmail.com> writes:
Show 9 quoted lines
> When rebasing my current branch onto the last master one, there're
> sometimes some commits which doesn't add anything anymore.
>
> Currently git-rebase produces the following message:
>
>     nothing added to commit but untracked files present (use "git add" to track)
>
> Would it be possible to add a new option to this command so it simply
> skip the unneeded commit ?

Our assumption has always been that it is a notable event that a patch that does not get filtered with internal "git cherry" (which culls patches that are textually identical to those that are already merged to the history you are rebasing onto) becomes totally unneeded and is safe to ask for human confirmation in the form of "rebase --skip" than to ignore it and give potentially incorrect result silently.

Obviously you do not find it a notable event for some reason. We would need to understand why, and if the reason is sensible, it _might_ make sense to allow a user to say "git rebase --ignore-merged" or something when starting the rebase.

Previous: Francis MoreauNext: Francis Moreau
Message 2 of 19 in “git-rebase skips automatically no more needed commits”
  1. Francis MoreauSep 6, 2011
  2. Junio C HamanoSep 6, 2011
  3. Francis MoreauSep 6, 2011
  4. Michael J GruberSep 7, 2011
  5. Junio C HamanoSep 7, 2011
  6. Francis MoreauSep 8, 2011
  7. Martin von ZweigbergkSep 8, 2011
  8. Martin von ZweigbergkSep 9, 2011
  9. Francis MoreauSep 9, 2011
  10. Martin von ZweigbergkSep 9, 2011
  11. Francis MoreauSep 9, 2011
  12. Martin von ZweigbergkSep 15, 2011
  13. Junio C HamanoSep 15, 2011
  14. Martin von ZweigbergkSep 16, 2011
  15. Martin von ZweigbergkSep 20, 2011
  16. Ramkumar RamachandraSep 24, 2011
  17. Martin von ZweigbergkSep 25, 2011
  18. Thomas RastSep 26, 2011
  19. Martin von ZweigbergkSep 28, 2011

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.