Skip to content

Instantly share code, notes, and snippets.

@shripadk
Created August 8, 2010 08:50
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 shripadk/513782 to your computer and use it in GitHub Desktop.
Save shripadk/513782 to your computer and use it in GitHub Desktop.
Here are some useful Git commands that I use on a regular basis.
git init
git status
git add .
git commit -a
touch tmp/.gitignore log/.gitignore vendor/.gitignore
git remote add origin (or codaset, github etc)
git@username:codaset.com/nameofproject.git
git push origin master
git remote show
You can even alias these and other commands in your .profile (Mac OsX) or .bashrc (Linux) to make them even faster and easier to use.
alias gst='git status'
alias gl='git pull'
alias gp='git push'
alias gd='git diff | mate'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch --color'
alias gba='git branch -a'
alias gco='git checkout'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment