Getting started:
http://try.github.com/
or same course on codeacademy (if you want to have a bage) http://www.codeschool.com/courses/try-git
setup:
https://help.github.com/articles/set-up-git#
You need setup you username and email. (If you skipp --global it will setup current repo. You can have different user name for different repo.)
Global git config is in you home dir. it named ".gitconfig" (windows, linux) Don`t forget to turn show hidden files.
Local config is in .git/config
For linux users I strongly recommend to colorify command line (looks like windows msisgit bash do it itself)
http://cheat.errtheblog.com/s/git
gitk --all Win/Lin/Mac.
Good tool to see branches. And make some changes. (I like to do cherry-pick via it.)
Random picture from internet:
Spoiler:
Code: Select all
git add .
Code: Select all
git add <file>
Code: Select all
git add -i
Code: Select all
git checkout <branch>
Code: Select all
git checkout <filename>
Code: Select all
git commit -m "Add new feature to project"
Commiting
You should try to commit as often as possible.
For bug fixes one bug one commit.
For development:
Implement one feature make commit.
Give readable name to commits.
Commiting all changes for day in one big commit is bad.
Good example of commit names: https://github.com/Warzone2100/warzone2 ... its/master
Free GUI tools for git:
msysgit for windows. It looks awful for me. I don`t like it. Console is better.
AptanaStudio3 has git interface. (It is Eclipse with preinstalled plugins. Javascript support.) I think it not hard to find Eclipse plugins.
I just mention that I used personaly. If you have something to add do it.
Feel free to ask questions.