Git 提交代码和更新代码

首先,操作之前一定要看清分支!!

其次,提交代码之前一定要先更新代码!!

git branch        -----查看当前分支

git pull             -----更新代码到本地   

提交代码:

1、在本地修改相应文件(或者文件新旧替换)

2、git add **/**/文件名    (文件修改路径)

(注意路径要写对)

3、git status         ----查看当前本地文件信息

4、 git commit -m "更改信息备注"

5、git push               --------提交代码到当前分支

(我一般git push 之前会看一下commit状态:git status)

到此Git提交代码就完成啦!

原文地址:https://www.cnblogs.com/cupleo/p/10416275.html