美文网首页
git 笔记

git 笔记

作者: 疏影清浅_Vickey | 来源:发表于2018-06-12 19:04 被阅读2次

查看帮助 git help <verb>                                  git <verb> --help

初始化新的repository                                          git init 

查看文件状态                                                     git status

新建 .gitignore 文件,用来指明不追踪的文件   touch .gitignore

add files to staging area                                    git add -A

remove files from staging area                         git reset

commit                                                              git commit -m " commit message"

查看更新日志                                                    git log

cloning a remote repository                              git clone <url><where to clone > 

viewing information about the  repository        git remote -v  

list all of the branches in our repository  both locally and remote  git branch -a

show changes in  files   git diff

pull changes                                                 git pull origin master

push changes we've just made                    git push origin master

新建分支                                                       git branch <branch_name>

显示所有分支                                                git branch 不跟分支名

显示merge过的分支名                                  git branch --merged 

删除分支                                                           git branch -d <branch_name>

switch to branch                                            giy checkout <branch_name>

分支合并                                                          git merge <branch_name>

相关文章

网友评论

      本文标题:git 笔记

      本文链接:https://www.haomeiwen.com/subject/hugleftx.html