首页 > 技术文章 > git拉取 提交代码(初级小白篇)

beidouwangyue 2020-05-06 09:27 原文

获取  

 

 

 

 

 

 

提交 (完整字符之间空格)

1.提交全部文件 (小白操作就全部推上去吧,没什么影响)

  git add . 

2.执行commit提交

  git commit -m "提交描述" 

(第一次commit 的时候可能会没有检测出提交人的信息,出现下面情况

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"  /** 复制此行在引号内填写邮箱*/
git config --global user.name "Your Name"  /**完成上步操作再复制此行填写姓名可随便填*/

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '邮箱@LAPTOP-414M58UN.(none)') 

3.合并远程分支代码

  git pull 远程分支名 (获取到远程分支并与本地合并更新) 

4.执行push推送代码

  git push 本地分支名:远程分支名(将本地代码push到git本地仓)

5.看到100%可以了

 

推荐阅读