Skip to content

Instantly share code, notes, and snippets.

@phunehehe
Last active December 15, 2015 15:19
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 phunehehe/5280609 to your computer and use it in GitHub Desktop.
Save phunehehe/5280609 to your computer and use it in GitHub Desktop.
Super condensed Git cheatsheet

Install Git

# Ubuntu
sudo apt-get install git
# OSX http://mac.github.com/

Create a Git repository in the current directory

# Open a terminal, `cd` to the project directory and then
git init

Add everything to a first commit (protip: ignoring files)

git add .
git commit -m 'type your awesome commit message here'

Hack hack hack

Add everything to a next commit (remember the protip: ignoring files)

git add .
git commit -m 'type your awesome commit message here'

There you are, and remember: "Commit early, commit often!"

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