Skip to content

Instantly share code, notes, and snippets.

@rcolepeterson
Last active August 29, 2015 14:03
Show Gist options
  • Save rcolepeterson/655c2c9fc8e86e71acc0 to your computer and use it in GitHub Desktop.
Save rcolepeterson/655c2c9fc8e86e71acc0 to your computer and use it in GitHub Desktop.
git cheat sheet

##https error fix / hack## in your git config file. Disables security and is kind of dangerous!!!

[http] sslVerify = false

##clone## $ git clone git://github.com/schacon/ticgit.git

##push## git remote add origin [email protected]:username/reponame.git

git push origin master

##new code ready to be pushed to a repository##

git init

git add --all

git commit -m "Initial Commit"

git remote add origin https://github.com/rcolepeterson/angularExampleCode.git

git push origin master

##code is already tracked by git / switch repo ##

git remote set-url origin https://github.com/rcolepeterson/angularExampleCode.git

git push origin master

###create a new repository on the command line###

touch README.md

git init

git add README.md

git commit -m "first commit"

git remote add origin https://github.com/rcolepeterson/angularExampleCode.git

git push -u origin master

###Export git archive --format=zip master > ../_toDeploy/repo.zip

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