github上传和删除文件(三)

上传文件:

git init 
git add *
git commit -m "description"
//git remote rm origin  或查看当前 git remote -v
git remote add origin https://github.com/xbtest/Demo01.git
//git pull --rebase origin master
//git push -u origin master
git push origin master

删除文件:

# 删除文件夹
git rm --cached -r filename

# 删除文件
git rm --cached filename

# 先执行完所有的删除操作,然后
# 再提交
git commit -m "remove directory"

# 最后
git push

待续。。。

借鉴原文地址:https://www.cnblogs.com/tbgatgb/p/11066762.html

原文地址:https://www.cnblogs.com/xiaozhaoboke/p/11406482.html