首页 > 技术文章 > git提交代码

hziwei 2020-08-19 19:32 原文

1.拉取代码

# git clone 代码地址
git clone https://github.com/hziwei/TensorFlow-.git

2.进入到项目目录

ls
cd TensorFlow-

3.提交文件

git add test.txt
# 或者使用 git add .

4.添加提交说明

git commit -m"test"


如果报上面这个错,需要配置用户名和邮箱

git config user.name "Your Name"
git config user.email "you@example.com"
# 或者进行全局配置
git config --global user.email "you@example.com"  
git config --global user.name "Your Name"

配置好后在执行

git commit -m"test"

5.执行上传

git push origin master

推荐阅读