Skip to content

Instantly share code, notes, and snippets.

@CleliaRezzola
Forked from ohararyan/GitCheat.html
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CleliaRezzola/53262608854dd56cd326 to your computer and use it in GitHub Desktop.
Save CleliaRezzola/53262608854dd56cd326 to your computer and use it in GitHub Desktop.
<!-- Move into Project folder -->
cd Sites
cd MyProject
<!-- Double check you are in the right folder -->
ls
pwd
<!-- Check to see if it is a git repository -->
git status
<!-- if is NOT, create one -->
git init
<!-- add your files -->
git add .
git commit -m "b"
<!-- set the repository url from github -->
git remote add origin https://github.com/CleliaRezzola/ywbc_majo_site.git
<!-- push to new repository -->
git push -u origin master
<!-- Once this is over, use the commands below -->
git status
<!-- check the status of what is happening right now -->
git add <files>
<!-- add your files to be commited -->
<!-- check it again (see what's happening) -->
git commit -m "what did you commit and why?"
<!-- commit your files with a meaningful message -->
git pull
<!-- pull down any changes from the remote repository and merge
these on top of our commit so we don't have any conflicts when we push our changes up -->
git push
<!-- push your changes to the remote repository -->
git checkout gh-pages
<!-- switch to the gh-pages branch -->
git merge master
<!-- merge in the changes on master -->
git push
<!-- publish the changes to gh-pages -->
git checkout master
<!-- all done start making changes on master again -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment