-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change commands to be more precise #328
Conversation
$ git checkout HEAD file and $ git checkout master file will produce the same result when HEAD and master point to the same commit but will produce different results when HEAD and master point to different commits. To make the text more precise and compatible with "last saved commit" we suggested learners to use $ git checkout master file
Don't we spend a lot of time talking about how to use |
HEAD points to a specific commit only in the so-called detached-head state. Naturally, HEAD points to branches (such as master). Because branches are not touched in this lesson, I think it is better to continue to use HEAD. Moreover, |
@maxim-belkin, I disagree. Because branches are not touched in this lesson, it is better to provide the command that will not betray the learner's expectations when they (almost inevitably) do encounter branches. The meaning of It might be worthwhile to also show that one can do
And clarify when those are synonymous and when they aren't (implied: branches matter). A more robust presentation would spend time fleshing out the concept of a In general, I find we are at odds with the fundamental operation of any DVCS by pushing branching out of scope. |
@atz, which statement specifically do you disagree with? Note: I always try to talk about branches (they are very important in my view). Introducing refs might be too much for a half-day lesson though. And definitely too much for new gitters |
What if we used the same command that's suggested by git to discard changes in the working directory (which we can emphasize goes back to the "most recent snapshot"), e.g.
|
fix survey link variables
|
The best definition for |
Closing because PR is stale. Also, recent changes show why we should keep using |
and
will produce the same result when HEAD and master point to the same commit
but will produce different results when HEAD and master point to different commits.
To make the text more precise and compatible with "last saved commit"
we suggested learners to use