Git

From Augix' Wiki

Jump to: navigation, search

Git中文教程

The most frequently used git commands.

$ git init
 
$ git add
$ git commit
 
$ git show
$ git diff
 
$ git whatchanged
$ git log
 
$ git branch
$ git checkout

Examples:

$ mkdir newproject
$ cd newproject
$ git-init-db
 
$ echo "Hello world" > hello
$ echo "Silly example" > example
$ git-add hello example
 
$ git-status
$ git-commit -m "Initial commit of gittutor reposistory"
 
$ echo "It's a new day for git" >> hello
$ git-show
$ git-diff
$ git-diff git-diff master print_sequence^
 
 
$ git-commit -m "new day for git"
 
$ git-branch robin
$ git-checkout robin
 
$ git-tag mytag f0af6283824688f9d23426031734657661b54388
 
$ git-checkout -f foo.c
Personal tools