oh-my-git icon indicating copy to clipboard operation
oh-my-git copied to clipboard

Teaching to use git pull is unfortunate

Open jviki opened this issue 4 years ago • 2 comments

Please, avoid teaching git pull as the initial skill. Or, at least, teach early another way that explains the pitfalls there. It brings me so much of additional work to explain to people why git pull often "breaks" their workspaces and how to deal with that or how to do it in a different way. And I have to deal with complex merges in histories made mostly accidentaly because of using git pull blindly.

The game is by the way awesome! Amazing idea.

jviki avatar Apr 24 '21 09:04 jviki

I think the preferred method should be git fetch followed by git merge origin/branch or git rebase origin/branch as appropriate. After this the shortcuts git pull and git pull --rebase for those operations can be introduced, once the mechanics of git branch --set-upstream-to= has been explored.

Rationale: People should learn to keep their history as flat as possible, because having merge commits in the history makes other tasks like bisecting much harder and more error-prone.

BenBE avatar Apr 24 '21 11:04 BenBE

would also suggest changing the pull card to show that it's fetch + merge to demystify the difference between pull and fetch.

ProfKitBarry avatar Nov 21 '23 15:11 ProfKitBarry