git指令笔记
2015-02-22 12:59
169 查看
git
git config --global user.name
git config --global user.email
mkdir repository.name
cd repo.name
pwd // show the current path
git init // init the folder to git.repo
git add file.name
git commit -m "commit message"
git status
git diff file.name
git log // check the commit history
git log --pretty=online
(HEAD,HEAD^,HEAD^^,HEAD~100) the latest
git reset --hard commit.idgit reflog // check all command history
workplace | stage | master
git diff HEAD --file.name
git checkout -- file.name // repeal all files in workplace, recover all workplace files to the lastert status
git reset HEAD file.name // unstagerm file.name
git rm file.name
git commit -m "remove message file.name"
(another situation of wrong delete)git checkout -- rm.filename
ssh-keygen -t rsa -C "41695562@qq.com"
git remote add origin git@github.com:niceforbear/repo_name.git // origin is default name of remote library
git push -u origin master // first use
git push origin master // second and later use
git clone git@github.com:niceforbear/clone_name.git
cd clone_name
ls
git checkout -b branch_name // switched to a new branch
branch_name
git branch branch_name
git check branch_name
git branch // check
git add/commit // all on the * branch
git checkout master // switched to branch 'master'
git merge branch_name // merge branch_name to current branch
git branch -d branch_name // deleted branch branch_name
git log --graph --pretty=online --abbrev-commit // check merge branch graph
git merge --no-ff -m "merge message with no-ff" branch_name // there is a branch in the history log
git config --global user.name
git config --global user.email
mkdir repository.name
cd repo.name
pwd // show the current path
git init // init the folder to git.repo
git add file.name
git commit -m "commit message"
git status
git diff file.name
git log // check the commit history
git log --pretty=online
(HEAD,HEAD^,HEAD^^,HEAD~100) the latest
git reset --hard commit.idgit reflog // check all command history
workplace | stage | master
git diff HEAD --file.name
git checkout -- file.name // repeal all files in workplace, recover all workplace files to the lastert status
git reset HEAD file.name // unstagerm file.name
git rm file.name
git commit -m "remove message file.name"
(another situation of wrong delete)git checkout -- rm.filename
ssh-keygen -t rsa -C "41695562@qq.com"
git remote add origin git@github.com:niceforbear/repo_name.git // origin is default name of remote library
git push -u origin master // first use
git push origin master // second and later use
git clone git@github.com:niceforbear/clone_name.git
cd clone_name
ls
git checkout -b branch_name // switched to a new branch
branch_name
git branch branch_name
git check branch_name
git branch // check
git add/commit // all on the * branch
git checkout master // switched to branch 'master'
git merge branch_name // merge branch_name to current branch
git branch -d branch_name // deleted branch branch_name
git log --graph --pretty=online --abbrev-commit // check merge branch graph
git merge --no-ff -m "merge message with no-ff" branch_name // there is a branch in the history log
相关文章推荐
- Git指令笔记
- git指令学习笔记
- git与github常用指令--学习笔记
- Git使用指令笔记
- 自用git指令笔记
- 「Git」使用笔记 「Git」指令大全 「Git」命令5分钟入门
- git 指令学习笔记
- Git常用指令笔记
- Git 学习笔记之指令
- Git学习笔记(1)——基本操作指令
- Git笔记——Git的常用指令和操作
- Git 常用指令笔记
- < 笔记 > Git - 10 Git 指令合集
- ARM学习笔记(九)--指令基本格式
- lua2.1的指令笔记
- CUDA学习笔记之同步操作指令
- Delphi基础学习笔记—指令{$R*.DFM}作用
- Git使用笔记
- C#学习笔记: 预处理器指令
- ARM汇编指令学习笔记(一、二)【晚上BOOTLOAD了,速度】