From 75a2cf6695602ee3e91e63a422197dec3ceb7166 Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Fri, 6 Dec 2013 19:49:12 -0500 Subject: [PATCH] Explaining away the -u flag --- git/novice/02-collab.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/git/novice/02-collab.md b/git/novice/02-collab.md index f70b38d0a..c24448d34 100644 --- a/git/novice/02-collab.md +++ b/git/novice/02-collab.md @@ -74,7 +74,7 @@ this command will push the changes from our local repository to the repository on GitHub: ``` -$ git push -u origin master +$ git push origin master Counting objects: 9, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. @@ -89,6 +89,13 @@ Our local and remote repositories are now in this state: FIXME: diagram +> ### The '-u' Flag +> +> You may see a `-u` option used with `git push`. +> This tells Git what [branch](../../gloss.html#branch) to use +> in the repository you're pushing to. +> We discuss branches and branching in our intermediate-level lessons. + We can pull changes from the remote repository to the local one as well: ``` @@ -145,11 +152,6 @@ To https://github.com/vlad/planets.git 9272da5..29aba7c master -> master ``` -Notice that we *didn't* use the `-u` flag to `git push`: -the origin repository (the one on GitHub) already knows what `master` means. -We discuss this in a lot more detail in our intermediate lesson -when we talk about branching. - Our three repositories now look like this: FIXME: diagram