git 学习笔记

作者: 廖阿哈 | 来源:发表于2019-04-02 16:42 被阅读8次

    查看用户名和邮箱地址:

    $ git config user.name

    $ git config user.email

    修改用户名和邮箱地址:

    $ git config --globaluser.name"username"

    $ git config --globaluser.email"email"

    git clone remote <url>  :从远程仓库复制到本地

    git remote -v 查看远程仓库

    git pull remote branch 同步远程分支  例如:git push origin master

    git push remote branch 提交到远程分支 例如 git push origin devBranch 

    git branch 查看本地分支

    git status 查看状态

    git checkout devBranch 切换到 devBranch分支

    git checkout -b newBranch   新建newBranch 并切换到 newBranch 分支

    git add remote <url>  添加远程仓库

    git add . 添加到缓存

    git commit -m  "注释"  提交到本地仓库

    git push  提交到远程仓库

    git merge devbranch 合并dev分支到当前分支

    相关文章

      网友评论

        本文标题:git 学习笔记

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