1. 程式人生 > >本地用git提交和刪除github上遠端倉庫的檔案

本地用git提交和刪除github上遠端倉庫的檔案

刪除遠端檔案的命令: 

git rm -r --cached dirname
git commit -m "delete file"
git push origin master

如,要刪除FragmentTabLayout-master專案檔案

git rm -r --cached FragmentTabLayout-master

git commit -m "delete file"

git push origin master

提交程式碼到github上的命令

git add dirname

git commit -m "first commit"

git push origin master

如, 要提交專案FragmentTabLayout-master專案檔案到github上

git add FragmentTabLayout-master

git commit -m "first commit"

git push origin master