Git基本操作
2019-08-05 10:20:28   0  举报             
     
         
 AI智能生成
  git基本操作
    作者其他创作
 大纲/内容
  submodule(undone)    
     初始化    
     git submodule init  
     循环操作    
     git foreach  
     gitk    
     打开内建的图形化工具  
     gc    
     git gc   
     mv    
     git mv a.txt b.txt  
     update-index    
     git update-index --assume-unchanged foo.txt  
     git update-index --no-assume-unchanged foo.txt  
     git update-index --really-refresh  
     rm    
     git rm *.txt  
     git rm *.txt -f (强制)  
     把文件从版本库中和暂存区移除!    
     git rm --cached README  
     grep    
     git grep -n gmtime_r  
     show    
     git show v1.4  
     clean    
     git clean -d -n  
     git clean -d -f   
     stash    
     查看储存栈    
     git stash list  
     保存到储存栈     
     git stash [ save "message" ]  
     git stash -u  
     git stash --keep-index  
     从储存栈恢复    
     git stash pop  
     git stash pop stash@{2}  
     git stash apply  
     git stash apply stash@{2}   
     从储存栈删除    
     git stash drop   
     git stash drop stash@{2}  
     基于暂存创建一个分支    
     git stash branch testChange  
     reset    
     git reset HEAD <file>  
     git reset --hard 39ea21a  
     取消工作区的合并!    
     git reset --merge  
     status    
     查看工作目录状态    
     git status  
     git status [ -s | --short ]  
     push    
     git push origin master  
     推送标签    
     git push origin v1.4  
     git push origin --tags  
     移除远程分支    
     git push origin :dev  
     git push origin --delete dev  
     commit    
     git commit [--message | -m ] “update”   
     分支主题  
     git commit -a -m 'update'  
     分支主题  
     git commit --amend  
     add    
     将文件添加到暂存区    
     git add  *.txt    
     git add -A   
     git add -p  
     config    
     初始化    
     git config --global user.name "username"  
     git config --global user.email email@email.cc  
     设置别名    
     git config --global alias.br branch  
     查看配置    
     git config --list  
     git config <key>  
     git config --global core.editor emacs  
     init    
     主要用于客户端    
     git init  
     主要用于服务端    
     git init --bare   
     remote    
     列出远程仓库    
     git remote  
     分支主题  
     git remote -v  
     分支主题  
     git remote show origin  
     git remote add myClone https://github.com/Kuri-su/Portflow-Monitor.git  
     git remote rename origin ori  
     分支主题  
     git remote rm origin  
     clone    
     可以使用各种专用协议 [ ssh:// | git:// | file:// | http:// ]  
     克隆仓库    
     git clone https://url.com/Kuri-su.git  
     分支主题  
     git clone https://url.com/Kuri-su.git  test  
     pull    
     git pull origin master  
     git pull --rebase  
     fetch    
      git fetch origin master  
     checkout    
     git checkout master  
     git checkout -b test2  
     git checkout -- readme.md  
     分支主题  
     分支主题  
     分支主题  
     git checkout --track origin/dev  
     branch    
     创建分支    
     git branch test  
     git branch still-a-branch 38bb7da5e  
     git branch still-a-branch older-branch  
     查看分支    
     git branch  
     git branch -v  
     git branch -vv  
     git branch --merge   
     git branch --no-merged  
     git branch -a  
     git branch -r  
     切换跟踪的远程分支    
     git branch -u origin/serverfix  
     删除分支    
     git branch -d test  
     git branch -D test  
     merge    
     git merge dev  
     tag    
     列出标签    
     git tag  
     git tag -l 'v1.8.5*'  
     贴上标签    
     git tag v1.4  
     git tag 1.4.7 e7b084 -m "alpha beta"  
     git tag -a v1.4 -m 'my version 1.4'  
     删除标签    
     git tag -d v1.4  
     diff    
     git diff foo.txt  
     查看暂存区文件和HEAD的区别    
     git diff --staged  
     指定范围内比较    
     git diff 77d231f HEAD  
     git diff 77d231f^  
     git diff 77d231f 05bcfd1 - book/bisection/  
     log    
     显示提交差异和统计信息    
     git log -2  
     git log -p -2  
     git log --stat  
     简短 | 完整  的显示提交    
     git log --pretty=short  
     git log  
     git log --pretty=full  
     git log --pretty=fuller  
     git log --pretty=format:"%h - %an, %ar : %s"  
     图形化显示 合并 | 提交 | 分支 历史    
     git log --stat   
     git log --graph  
     根据日期筛选提交    
     git log --after=2.weeks  
     git log --before="2017-10-15"  
     根据 作者 | 提交者 | 文件 筛选提交    
     git log --author kurisu  
     git log --committer kurisu  
     git log git.png  
     根据 关键字 筛选提交    
     git log --grep kurisu  
     git log -S function_name  
     rebase    
     git rebase master  
     改变历史    
     git rebase -i HEAD~3  
     底层指令 ( Plumbing ) ( undone )    
     cat-file ( undone )  
     hash-object ( undone )  
     update-index ( undone )  
     write-tree ( undone )  
     read-tree ( undone )  
     update-ref ( undone )  
     symbolic-ref ( undone )  
     verify-pack ( undone )  
     cherry-pick ( undone )  
     reflog(undone)  
     fsck (undone)  
     bundle(undone)  
     blame(undone)  
     rerere(undone)  
     grep(undone)  
     自由主题  
    
 
 
 
 
  0 条评论
 下一页
  
   
   
   
   
  
  
  
  
  
  
  
  
  
  
 