Skip to content

Instantly share code, notes, and snippets.

@bytezen
Created February 2, 2016 00:13
Show Gist options
  • Save bytezen/31d885832878b1ef0858 to your computer and use it in GitHub Desktop.
Save bytezen/31d885832878b1ef0858 to your computer and use it in GitHub Desktop.
IML400 Cribsheet for adding files to repo from command line

To commit stuff to your repo

0)...to change your website make sure that you are on the gh-branches branch ..say what???

enter: git branch what you want to see is '* gh-pages'

-- gh-pages is the branch (i.e. part of your repo) that has your website

  • If you don't see '* gh-pages' then:

git checkout gh-pages [ what this does is change you to the branch (i.e. part of your repository) that has all of the html pages for your real website]

  1. make sure that you are in your project directory

  2. git status ( to check the status of your new files)

  3. git add . [ this will stage all of the files that are new and have been changed]

  4. git commit -m " enter a message here of what you are adding to the repo" [ this is going to add all of your files LOCALLY!! ]

  5. git push [ this adds all of your files from LOCAL to REMOTE -- remote is your server]

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