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

Alternative Solutions for 05-history.md #397

Open
wants to merge 1 commit into
base: gh-pages
from

Conversation

Projects
None yet
3 participants
@AlexSUnderwood

AlexSUnderwood commented Mar 27, 2017

I know there is currently a pull request open right now containing solutions to some of the challenges in 05-history.md, but I felt it might help to write some solutions that better fit with the "role-play" of the challenges and help explain a little bit more about what each choice in the challenge does.

This is for instructor training checkout.

> >
> > 1. `$ git checkout HEAD`
> >
> > When Jennifer runs this command, git will not change any of her files because this command does not specify which files she wants to checkout.

This comment has been minimized.

@maxim-belkin

maxim-belkin Jun 8, 2017

Contributor

When no file names are specified, git checkout <ref> moves the HEAD pointer to the specified <ref>. Therefore, git checkout HEAD does not change any files not because there are no files specified but because git checkout behaves differently: it moves HEAD to HEAD. git checkout HEAD~1, for example, will change contents of all files. I'd suggest either expanding this explanation or adding a small section mentioning that checkout (and reset) behave differently when file names are specified on the command line.

> >
> > 2. `$ git checkout HEAD data_cruncher.py`
> >
> > With this command, git will replace Jennifer's "broken" copy of data_cruncher.py with the previous commit's unmodified version. She'll be given a "pre-break" file and have a chance to try editing it again.

This comment has been minimized.

@maxim-belkin

maxim-belkin Jun 8, 2017

Contributor

"broken" is jargon. You can either use "current" or omit this word at all.
"pre-break" is jargon as well. In fact, I don't think we need the second sentence altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment