Skip to content

Instantly share code, notes, and snippets.

@mlconnor
Last active December 14, 2015 08:38
Show Gist options
  • Save mlconnor/5059548 to your computer and use it in GitHub Desktop.
Save mlconnor/5059548 to your computer and use it in GitHub Desktop.
My git cheat sheet
# create a repo
# 1. In your user bar at the top right of any page, click the "Create a New Repo" button
# 2. Dashboard context switcherSelect the account you wish to create the repository on
# 3. Create repository fieldEnter a name, select to make the repository either public or private and click "Create repository"
git clone https://github.com/mlconnor/[new-project-name]
# add your files
git add index.js
# commit that stuff back to github
git push origin master
npm install git://github.com/visionmedia/express.git
# http://stackoverflow.com/questions/1983346/deleting-files-using-git-github
# if you move a bunch of stuff and want git to resolve the differences before committing
git add . -A
git commit -m "removed some files, etc."
git push -u origin master
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
echo ".DS_Store" > .gitignore # then check that file in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment