Monday, February 9, 2015

Configure git after installation


sudo <packagemanager> install git


git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global core.editor vim
 
git config --global diff.tool kdiff3
git config --global merge.tool kdiff3
git config --global --add difftool.prompt false 


More aliases

git diff <path to file> 

This will show the diff between the uncommited file and the one that was present after checkout

git diff --cached 

This will show the diff between the committed file and the checkout one.


git pull 


Workflow

Usual:
 git add <file1>
 git add <file2>
 git commit -m "commit message -- description of what the commit is about"
 git push origin master