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

Re: merging multiple commit into one?

From
MJMALET Jean-Luc <jeanluc.malet@gmail.com>
Date
May 11, 2009, 22:11 UTC
Message-ID
<4A08A28C.3020202@gmail.com>
In-Reply-To
<20090511212923.GA19844@macbook.lan>
Heiko Voigt wrote:
Show 23 quoted lines
> On Mon, May 11, 2009 at 03:21:27PM +0200, jean-luc malet wrote:
>   
>> according to my knowledge of git, removing the commit and rewriting
>> the last commit log so that it better reflect the modification will do
>> the job but I'm not sure git allow it...
>>     
>
> If you just want to get rid of the last commit
>
>   git reset HEAD^
>
> will remove the commit but keep your working directory untouched. In
> such a workflow I find it easier to start the new commit from zero than
> from the stashed stuff.
>
> By the way. You might also take a look at the command
>
>   git stash
>
> which is especially crafted for saving work in progress.
>
> cheers Heiko
>   

hi, thanks, I know about git stash, the problem is that this command don't fits well when working on multiple copies of the sources on different locations, git stash is usefull for saving states before branching elsewhere and comming back to the branch and keep going on your work.... I use it in a different way since I commit to continue work on a different pc, (so I commit, I push to some git archive, I pull from the other pc, and continue the work on the other pc, then commit push again and pull again on first pc....). As far as I know you can't push stashed information, I'm wrong? thanks JLM

Previous: Heiko VoigtNext: Heiko Voigt
Message 8 of 10 in “merging multiple commit into one?”
  1. jean-luc maletMay 11, 2009
  2. Andreas EricssonMay 11, 2009
  3. Jakub NarebskiMay 11, 2009
  4. MALET Jean-LucMay 11, 2009
  5. Jakub NarebskiMay 11, 2009
  6. jean-luc maletMay 12, 2009
  7. Heiko VoigtMay 11, 2009
  8. MALET Jean-LucMay 11, 2009
  9. Heiko VoigtMay 12, 2009
  10. Markus HeidelbergMay 12, 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.