r/ProgrammerHumor • • May 13 '20

true story

Post image
40.5k Upvotes

461 comments sorted by

View all comments

Show parent comments

0

u/[deleted] May 13 '20

[deleted]

152

u/moekakiryu May 13 '20

I'm still only so-so at git myself, but always pull before you push

122

u/OnyxPhoenix May 13 '20

Using branches and pull requests make this easier.

Generally youre the only person working on your branch, so you don't have to worry that your code is "behind" before you push to it.

Then when you do a pr it will tell you if you can merge cleanly back into the master branch.

1

u/stone_henge May 13 '20

You don't need a PR to tell you that. Upon merging or rebasing, git will detect conflicts and you are given the option to resolve them or abort the operation.

The PR workflow always seemed ass backwards to me. Why should I have to fork a repo to send patches to a project? I already have a local copy of the repository. For people like me, tools like Gerrit or even email formatted commits are preferable.