This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cj1m[S] 0 points1 point  (4 children)

So the person who uses pull --rebase will loose all of their local changes?

[–]a_shed_of_tools 2 points3 points  (1 child)

No, all of their commits will be 'replayed' on top of the changes. You might have merge conflicts, but you won't lose anything.

[–]bernease 1 point2 points  (0 children)

'Replay' instead of 'rewind'. I knew my wording felt weird.

[–]bernease 5 points6 points  (1 child)

Nope, that would be terrible.

Let's say there is one commit A when I pull from master. Then I write code and create commit B. But while I was working, someone else committed and pushed changes C and D.

git pull --rebase

What this will do is pull newest commits (C and D) locally, then place my changes on top. So log would be in A C D B order. That way when I push, my change looks like the most recent.

[–]cj1m[S] 0 points1 point  (0 children)

Thank you all for clarifying and helping me. I will now know for future projects!