git 提交代码

先连接到github

$ ssh -T git@github.com
Enter passphrase for key '/c/Users/Lucifa/.ssh/id_rsa':
Hi JACKY! You've successfully authenticated, but GitHub does not provide shell access.

更新代码服务器代码

$ git pull
Already up-to-date.

先把新的文件test123.sh加入到暂存区

$ git add test123.sh        (如果是删除文件执行 git rm test123.sh,后面是相同的命令)

确认提交。

$ git commit -m 'test123'

提交到服务器

$ git push origin master

原文地址:https://www.cnblogs.com/yangxuming/p/6741719.html