Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Commit

Permalink
Explaining away the -u flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gvwilson committed Dec 7, 2013
1 parent f6e9ac0 commit 75a2cf6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions git/novice/02-collab.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:

```
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 75a2cf6

Please sign in to comment.