Last active
December 14, 2015 08:38
-
-
Save mlconnor/5059548 to your computer and use it in GitHub Desktop.
My git cheat sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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