Usefull GIT commands
If you're using Mac, i highly recommend Atlassian's SourceTree

If you're an authentic geek and wants to stick with command line, below are a few commands if you're beginning with git.
git add all and commit in one line
git commit -a -m "added a bunch of awesome features"git add a file, but you want it on gitignore instead
git rm --cached file.phpgit added too early, you want a couple of more codes before push
git add forgotten-file.php
git commit --amendunstage a file
git reset HEAD file.phpadding terminal colours
git config --global color.status auto
git config --global color.branch auto
git config --global color.diff autogit shortcuts using bash_profile
Open your ~/.bash_profile and add the following
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout 'Next, you should source for your new configuration to take effect
$> source ./~bash_profileNow enjoy the shortcuts like so
$> ga file.phpWritten by jay mabazza
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Git 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#
 
 
 
