yosun.me: yosun is me » git http://yosun.me a diary. maybe. Tue, 30 Sep 2014 22:07:10 +0000 en hourly 1 http://wordpress.org/?v=3.1 git in a box http://yosun.me/2012/01/20/git-in-a-box/ http://yosun.me/2012/01/20/git-in-a-box/#comments Fri, 20 Jan 2012 11:00:47 +0000 yosun http://yosun.me/?p=167 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’

]]>
http://yosun.me/2012/01/20/git-in-a-box/feed/ 0