命令

$ git config --global user.name "your name"   #设置用户名


$ git config --global user.name "your name"$ git config --global user.email  #设置邮箱
 

$ git remote add origin git@github.com:yourName/yourRepo.git   # 进入要上传的仓库,右键git bash,添加远程地址

$ git push origin master   #命令会将本地仓库推送到远程服务器

$ git pull                         #命令会将远程服务器覆盖本地仓库

$ touch .gitignore            #添加.gitignore

$ vim .gitignore               #编辑.gitignore   

原文地址:https://www.cnblogs.com/abc101/p/5216179.html