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

Re: git pull --rebase and losing commits

From
Peter Krefting <peter@softwolves.pp.se>
Date
Nov 3, 2009, 07:01 UTC
Message-ID
<alpine.DEB.2.00.0911030757400.15633@ds9.cixit.se>
In-Reply-To
<20091102151022.GA3995@atjola.homenet>
Thomas Rast:
> Not very surprising if you use the 'ours' strategy, which doesn't merge at 
> all but instead takes the 'ours' side (IIRC that's the upstream for a 
> rebase, but I always have these mixed up).

Sounds like it should be called "theirs", then. Or the documentation should be clarify.

> So what happens is that git-rebase rebuilds some commit C from your side 
> on some base B from the remote, but the 'ours' strategy turns the *tree* 
> for C' into that of B.

Right. I thought it was working on the individual blobs (I want it to automatically resolve conflicts by applying the version that is in the repository I am running the rebase from, no matter what).

Björn Steinbrink:
Show 8 quoted lines
> The "ours" strategy doesn't just avoid merge conflicts, it avoids making
> any changes at all. The ours strategy means "just keep our state, just
> pretend that we've merged". And rebase will see that there were no
> changes and conclude:
>
> Already applied: 0001 test commit
>
> And thus it will drop the commit.

I've seen that message show up in my logs a couple of times. I'd better drop the --strategy=ours, then. :-/

Now to figure out if it is possible to get a setup like this working at all. Maybe dropping rebase in favour of regular merge may help a bit, but I still want it to auto-resolve any conflicts for me.

-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Björn SteinbrinkNext: Johannes Schindelin
Message 5 of 38 in “git pull --rebase and losing commits”
  1. Peter KreftingNov 2, 2009
  2. Thomas RastNov 2, 2009
  3. Nanako ShiraishiNov 2, 2009
  4. Björn SteinbrinkNov 2, 2009
  5. Peter KreftingNov 3, 2009
  6. Johannes SchindelinNov 3, 2009
  7. Peter KreftingNov 3, 2009
  8. Clarify documentation on the "ours" merge strategy.Peter Krefting, Nov 11, 2009
  9. BazNov 11, 2009
  10. Thomas RastNov 11, 2009
  11. BazNov 11, 2009
  12. Junio C HamanoNov 11, 2009
  13. Re: Clarify documentation on the "ours" merge strategy.Nicolas Sebrecht, Nov 11, 2009
  14. Thomas RastNov 11, 2009
  15. Junio C HamanoNov 12, 2009
  16. Peter KreftingNov 12, 2009
  17. Nanako ShiraishiNov 14, 2009
  18. Junio C HamanoNov 15, 2009
  19. Peter KreftingNov 16, 2009
  20. Björn SteinbrinkNov 12, 2009
  21. 0/3 Document and refuse rebase -s oursThomas Rast, Nov 15, 2009
  22. 1/3 Documentation: clarify 'ours' merge strategyThomas Rast, Nov 15, 2009
  23. 2/3 rebase docs: clarify --merge and --strategyThomas Rast, Nov 15, 2009
  24. Junio C HamanoNov 15, 2009
  25. Thomas RastNov 15, 2009
  26. 3/3 rebase: refuse to rebase with -s oursThomas Rast, Nov 15, 2009
  27. Sverre RabbelierNov 15, 2009
  28. Thomas RastNov 15, 2009
  29. Johannes SchindelinNov 16, 2009
  30. Junio C HamanoNov 16, 2009
  31. Johannes SchindelinNov 16, 2009
  32. Junio C HamanoNov 16, 2009
  33. Sverre RabbelierNov 16, 2009
  34. A Large Angry SCMNov 16, 2009
  35. Junio C HamanoNov 15, 2009
  36. Thomas RastNov 15, 2009
  37. Thomas RastNov 3, 2009
  38. Randal L. SchwartzNov 3, 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.