git命令

1、在新建项目下

(1)git init

(2)git remote add origin git@github.com:wenwen1289/MyBaitsDemo.git

注意,本地使用git开头的url不要用http开头的

(3)git add -A 添加所有变化

##git add -u 添加被修改(modified)和被删除(deleted)文件,不包括新文件(new)
##git add . 添加新文件(new)和被修改(modified)文件,不包括被删除(deleted)文件

(4)git commit -m 'firstCommit'

(5)git push -u origin master

第五步如果遇到

Unable to access 'https://github.com/**/**/': OpenSSL SSL_read: Connection was aborted, errno 10053 

记录下解决方案:

git config --global http.sslVerify false

再执行push命令

2、git remote rm origin --先删除远程 Git 仓库



原文地址:https://www.cnblogs.com/wenwenzuiniucha/p/14713919.html