1,init repository
- mkdir demo
- cd demo
- git init
2,configure repository information
- git config user.name "Garfield Trump"
- git config user.email
3,query repository config information
- git config -e
- git config -e --global
- git config -e --system
- cat .git/config
4,add file into repository
- echo "Hello." >> welcome.txt
- git add welcome.txt
- git status
- git status -s
- git commit -m "initialized"
- git status
- git status -s
5,query repository information of path
- mkdir -p a/b/c
- cd a/b/c
- git rev-parse --git-dir
- git rev-parse --show-toplevel
- git rev-parse --show-prefix
- git rev-parse --show-cdup
6,show repository log
- git log
- git log --pretty=fuller
7,clone repository
- cd /path/to/my/workspace
- git clone demo demo1
阅读(2155) | 评论(0) | 转发(0) |