IT@程序员猿媛程序员

git 学习笔记

2019-04-02  本文已影响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分支到当前分支

上一篇 下一篇

猜你喜欢

热点阅读