git-novice icon indicating copy to clipboard operation
git-novice copied to clipboard

Add a git fetch exercise?

Open jangari opened this issue 8 years ago • 3 comments

Every time I teach this, participants ask how they can check to see whether origin has been updated before they try to git push so as to know in advance whether they're going to have to merge anything, or more generally just to compare their latest committed version with origin.

Is it worth adding a small exercise showing git fetch, and then how to compare master with origin/master?

jangari avatar Jun 27 '17 04:06 jangari

I agree. I also think it would be worth clarifying that git pull is equivalent to git fetch && git merge origin/<upstream-branch>. That would demystify git pull a bit, as well as clarifying the separation between merging branches and interacting with an upstream repo.

naught101 avatar Oct 25 '17 04:10 naught101

8 - Collaborating mentions fetch, but only in the solution to the review changes challenge at the end.

As @naught101 mentions, pull should be clearly defined as a combination of fetch and merge.

esmesh avatar Apr 10 '19 16:04 esmesh

I think git fetch is starting to go into intermediate territory, which is out of scope for a novice lesson. Maybe if this were a full-day lesson, but since it isn't we need to be careful that this novice lesson doesn't go out of scope.

kekoziar avatar Jul 04 '19 16:07 kekoziar