git常用命令笔记
2015-05-22 01:14
232 查看
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常用命令 及中文环境设置
- git 常用命令笔记
- 【Git/Github学习笔记】Git常用命令(版本回退)
- 项目管理---git----快速使用git笔记(六)------本地开发与远程仓库的交互----常用git命令
- Git 常用命令笔记
- Git常用命令笔记
- git 常用命令笔记
- Git常用命令清单笔记
- git常用命令(对付差记性,不断更新的笔记)
- 【Git/Github学习笔记】Git常用命令(代码冲突二)
- git 学习笔记/收录平常常用的命令
- git常用命令和ViM编辑器----源于培训笔记
- git 常用命令笔记
- 【笔记】git常用命令
- 【Git学习笔记】Git常用命令总结
- git常用命令学习笔记
- 【Git/Github学习笔记】Git常用命令(代码冲突)
- Git学习笔记_01(基本常用命令)
- Git常用命令笔记
- 【Git/Github学习笔记】Git常用命令(代码拉取)