Short steps for homework2 ========================= $ cd /usr/src/linux-2.6-git $ git checkout -b hmwk2 v2.6.18 [patch kdb] $ git add . $ git commit -a -m "Patched KDB" [Added system call] [edit/compile/test] $ git add . $ git commit -a -m "Homework2 done" $ git format-patch -k --stdout v2.6.18 > ~/hmwk2.patch [submit patch and test files] Basic commands ============= $ git branch [show branches of the working directory] $ git tag -l [show the list of tags] When something goes wrong ========================= $ git reset --hard HEAD [resets all changes and goes back to HEAD] Or $ git clean -d $ git checkout -f Or $ git add . $ git commit -a -m "{any message}" $ git reset --hard HEAD^ Some terms ========== HEAD it points to the working tree commited recently HEAD^ the parent of HEAD HEAD^^ the grandparent of HEAD