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

Re: Any way to "flatten" a series of changes in git

From
DSDaniele Segato <daniele.bilug@gmail.com>
Date
Oct 26, 2009, 13:42 UTC
Message-ID
<9accb4400910260642w360e2879vd3b1b1efc3613a13@mail.gmail.com>
In-Reply-To
<26ae428a0910221358r47434b4uf7ec71f9376b9f75@mail.gmail.com>

On Thu, Oct 22, 2009 at 9:58 PM, Howard Miller <howard@e-learndesign.co.uk> wrote:

>> git merge --squash topic
>> rebase --interactive it excellent for cleaning up history, especially [...]
> Brilliant, thanks everybody!! I'll go and back up my database and have
> a play with these options.

I don't think you need it. when you rebase or squash git don't throw away your commits

when I do things like that I usually create a new branch to do my tests
if I'm happy with the result I can do

git checkout myRealBranch git reset --hard myTestBranch # do the push/svn dcommit/whatever

if I'm not happy I can start all over again just doing:

git checkout MyTestBranch git reset --hard myRealBranch

regards, Daniele

Previous: Howard MillerNext: Jakub Narebski
Message 6 of 14 in “Any way to "flatten" a series of changes in git”
  1. Howard MillerOct 22, 2009
  2. Bill LearOct 22, 2009
  3. Bill LearOct 22, 2009
  4. Jacob HelwigOct 22, 2009
  5. Howard MillerOct 22, 2009
  6. Daniele SegatoOct 26, 2009
  7. Jakub NarebskiOct 22, 2009
  8. Howard MillerOct 22, 2009
  9. Howard MillerOct 22, 2009
  10. Jakub NarebskiOct 22, 2009
  11. Howard MillerOct 23, 2009
  12. Howard MillerOct 23, 2009
  13. Johannes SixtOct 23, 2009
  14. Junio C HamanoOct 23, 2009

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.