This is a git project only used for test. Git Web Browse http://ccode.ihep.ac.cn/git I. Git Configure 1. Needed git config --global user.name 'yourname' git config --global user.email 'yourname@email.server' 2. Optional git config [--global] core.editor vim git config [--global] core.paper 'less -N' git config [--global] color.diff true git config [--global] alias.co checkout you can use 'git var -l' to list git configure. II. Clone Remote Repository to Local git clone git@ccode.ihep.ac.cn:git-test-project.git III. Commit to Repository 0. Show modified file git rm file git ls-files -m 1. Add changes git add . 2. Commit to Local Repository git commit -a -m 'your commit message' or git commit -a -e 3. Push to Remote Repository git push or git push origin master IV. Update Local Repository 1. List remote repositories git remote -v 2. Get latest version from remote to local git fetch [repository] [branch] Exmaple: git fetch origin master It means download updates from master branch of remote origin repository to master branch of local origin repository 3. Compare differences between local and remote repository git log -p master.. origin/master 4. Merge remote to local git merge origin/master V. Local Branch 1. List remote branches git remote -v 2. Check out remote branch as a new branch to local git fetch origin master:temp 3. Compare differences between origin branch and local branch git diff temp 4. Merge other branch to master branch git merge temp 5. Delete branch git branch -d temp You can force to delete a branch withou merging to master branch: git branch -D temp