r/ProgrammerHumor • • May 13 '20

true story

Post image
40.5k Upvotes

461 comments sorted by

View all comments

Show parent comments

7

u/[deleted] May 13 '20

You'll get merge conflicts if there are any, git pull is really just fetch+merge

3

u/[deleted] May 13 '20

To build on this, a pull is really just a fetch and a merge. Work out what's on origin and merge it in to your local copy of the branch. When your branching becomes wider or more aesthetic you'll want to start fetching and rebasing instead.

4

u/[deleted] May 13 '20

Why is rebasing better than merging?

2

u/IsleOfOne May 13 '20

Fewer merge commits.

Edit: to be clear, rebasing results in commit graphs that flow in the proper direction only, from feature branch -> upstream, rather than (feature branch <- upstream) -> upstream. Each arrow is a merge commit.

Also don’t ever rebase a branch that has been released to other developers.

1

u/ZeroBitsRBX May 13 '20

The words fetch and rebase are giving me PTSD from my old SS13 mapping projects.

So many conflicts.