Here’s the gist of git in a box (Legend: {directions} whereas [replace me]):

{cd to folder you want git to vc} git init
{add everything in folder to git} git add .
git commit -a -m “[notes about this commit]”
{Stage + Commit via Alias*} git coma “[notes about this commit]“
{new idea?} git branch [new branch name]
{back to a prev branch?} git checkout [branch name]
{cd back to master} git merge [branch to merge]
gitk – - all {loads a git gui! (note – two dashes no space)}

* One issue with git is that it does not automatically “git add .”… so if you end up committing adding files and directories to your project after that first “git add .”, you might end up with versions with missing file or directory references!

Here’s one simple way is to set up an alias that does both the “git add .” and the “git commit -a -m.” Type this into the terminal:

git config –global alias.coma ‘!git add . && git commit -a -m’

Tagged with: