Git Bash 命令行方式 提交源码到GitHub

 git clone  远程路径
 cd cloud
 touch a.txt
 git add a.txt
 git commit -m '123'
 git push -u origin master
 
 
git命令
git一般是----clone项目到本地----add添加一个文件-----commit提交到缓存区----push提交到远程
1:克隆项目
git clone    远程路径---------将github上的项目克隆到本地
2:创建一个文件
touch a.txt    ------创建一个a.txt文件
3:添加到本地存储库
git add a.txt--------将a.txt添加到本地存储库
git add .     ------将目录下的文件添加到本地存储库
4:提交到缓存区
git commit  ------将新添加的文件提交到缓存区
git commit -m '提交域2018/7/27'------将新添加的文件提交到缓存区,并添加上注释
5:提交到远程
git push   ------将缓存区的文件提交到远程
 
 
原文地址:https://www.cnblogs.com/xueershewang/p/9273792.html