These are chat archives for MontCode/GeneralChat

24th
Jul 2016
Lily Romano
@Lilyheart
Jul 24 2016 00:37
Your push command pushed to the master branch. You just need to type git push
@VictorHall
Victor
@VictorHall
Jul 24 2016 03:09
ok
would it be "git push origin gh-pages" ?
Lily Romano
@Lilyheart
Jul 24 2016 03:15

Here is the details. origin is the name git uses to remember where your GitHub is (when you type git remote -v you’ll see the origin name there.
The command you are using broken down (the comments form a sentence:

git // using the git application…
push // push the code online…
origin // and force the push to go to the remote labeled origin…
gh-pages // to the gh-pages branch

If you replace gh-pages with master like you did earlier, you’ll see why your code didn’t appear like you thought. You should just be able to do a git push and be fine. If you go back, you’ll see that you forced the —set-upstream which makes the default last two arguements origin gh-pages

Victor
@VictorHall
Jul 24 2016 03:22
so the origin is already gh-pages, theres no need to state the default again
Lily Romano
@Lilyheart
Jul 24 2016 03:22
type in git remote -v
Victor
@VictorHall
Jul 24 2016 03:23
blob
Lily Romano
@Lilyheart
Jul 24 2016 03:24
you can see what “origin” is. It might be helpful to think of “origin” as a variable name that stores that web address. So that is what “origin” means.
gh-pages is the branch
Victor
@VictorHall
Jul 24 2016 03:25
understood
thanks
Lily Romano
@Lilyheart
Jul 24 2016 03:25
your first push onto the gh-pages branch, your command was git push --set-upstream origin gh-pages so you “set” the push to go up stream to the webaddress origin AND to the branch gh-pages.
Victor
@VictorHall
Jul 24 2016 03:28
thanks
Lily Romano
@Lilyheart
Jul 24 2016 03:29
np! helping others helps me! It makes it easier to remember the commands :p honestly I ALWAYS forget the command to set that up stream stuff. If you don’t do it, the first time you git push, it’s like HEY! YOU! I DUNNO WHERE TO GO! and then literally puts the command in the error message so all you have to do is copy and paste it.