1.先创建一个文件
$ git add temp
$ git commit -m "adding temp"
$ git push
2.删除该文件
如果仅想在本地删除,rm temp即可
$ git rm temp
$ git commit -m "remove temp"
$ git push
注意:
a.在克隆的本地的仓库中打开终端
b.如果本地没有temp文件,但在远程仓库中存在,说明本地的temp文件是用rm命令删除的;此时,同样用上面的三个命令即可删除远程仓库的文件