Git 常用命令

git 安装完成后首先要配置个人账号信息

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

git status 查看仓库状态 

git clone url 下载远程代码

git branch 查看仓库分支

git branch Lee 创建新分支

git remote 查看远程分支

git push -u origin master 第一次远程提交

git add .  把修改文件状态提交到仓库

git commit -m submit 提交文件到本地仓库

git push 提交到远程

git push origin master 提交到远程

git pull 拉去远程分支到本地

原文地址:https://www.cnblogs.com/myshowtime/p/9536981.html