Skip to content
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

removed -u as per lesson today (Padova September 2017) #57

Merged
merged 1 commit into from Nov 17, 2017

Conversation

@yurj
Copy link
Contributor

@yurj yurj commented Sep 14, 2017

Please delete the text below before submitting your contribution.


Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.

Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com).


@drjwbaker drjwbaker requested review from weaverbel and jezcope Sep 20, 2017
Copy link
Contributor

@weaverbel weaverbel left a comment

I am good with this - I checked with Git documenation and it seems OK to just have git push.

Copy link
Collaborator

@jezcope jezcope left a comment

Yup, this looks fine to me.

@jezcope
Copy link
Collaborator

@jezcope jezcope commented Sep 21, 2017

More detail: As long as you're always specifying the remote (origin) and branch (master) the -u flag is irrelevant, because what it does is set up a default. After you've done git push -u origin master, all subsequent push and pull commands can be done simply as git push and git pull because -u tells git to remember the origin and master arguments as defaults.

If you try to do git pull on its own without having first done git push -u origin master, it will complain that it doesn't know where you want to pull from.

Even more detail: -u is a synonym for the longer option --set-upstream. What this actually does is to make the specified remote (in this case origin) the default for the specified branch (in this case master). This means that whenever I'm on the master branch, commands that work on a remote will default to origin, but it doesn't affect other local branches that I may have created.

All of this seems like far too much cognitive load to include in the lesson, and the use of -u is a timesaving feature that people will learn for themselves if the use git a lot but won't miss if they use git rarely.

@jezcope jezcope merged commit 3251766 into data-lessons:gh-pages Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants