$git push origin master 出现 everything up -to-date

lz今天用git将本地代码传到github上去,一步步的代码如下:

1.登陆账号密码:

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

2.产生密钥对:$ssh -keygen -t rsa -C "[email protected]",github上配置公钥私钥

3.测试是否连得上github:$ssh -T [email protected]

3.添加代码到缓存:$git add .

4.查看github上代码是否出错:$git pull origin master

5.上传代码到github上:$git push origin master

第5步之后出现everything up -to-date。

原因是在第3步之后需要加  $git commit -m "提交信息"。不然会报错。 两者不能少其一。

你可能感兴趣的:(github)