Git Operation
git
git cmd
-
git set up
- git init --bare xxx.git
-
git clone
- git clone ssh://userid@10.100.150.13/home/project/xxx.git
-
Git safety push procedure
- git add filename
1a. git reset HEAD . //撤销git add - git comment -m “comments”
- git pull
- git push
- git add filename
-
Git branch
-
Git branch status
- git branch -a
-
switch branch
- git checkout <branch_name>
-
new branch
- git checkout -b dev
-
-
Tag
-
tag list
- git tag
- git tag -l
-
tag create
- git tag -a <tag_name> -m “tag comments”
-
tag push
- git push origin <tag_name>
- git push origin --tags
-
switch to tag version
- git checkout <tag_name>
-
revise from tag version
- git checkout -b <branch_name> <tag_name>
-
tag delete
- local: git tag -d <tag_name>
- remote: git push origin --delete tag <tag_name>
-
-
get a single file
- git checkout <branch_name> <file_name>
-
push to remote branch
- git push origin <local_branch>:<remote_branch>
-
git log
-
latest commit with content diff
- git log -n 1 --stat
-
-
git diff
- git diff master origin/master //比较本地仓库 vs 远程仓库
repo
repo note
-
repo related branch
-
log
gerrit
push to gerrit
- git push origin HEAD:refs/for/master
XMind - Trial Version