Git基本操作

1.初始化

git init

2.提交文件

git add filename.xxx

3.commit

git commit -m "why commit this file"

4.push

git push -u origin master

以上完成了将文件push到远程仓库中。

5.下载远程库

git clone https://github.com/***/****.git

6.查看本地仓库与远程库区别

git status

7.删除远程库的文件(本地不存在,通过上个命令知道)

git rm filenaem.xxx 
git commit -m "commit context"
git push -u origin master

 8.远程仓库更新到本地

git pull

9.删除远程仓库文件

git rm -r --cached 文件/文件夹名称
原文地址:https://www.cnblogs.com/ys99/p/9126912.html