Git从远程仓库中删除文件,并上传新文件

目录

删除:

拉取远程分支的更新:

​编辑

首先查看git状态:

​编辑

删除文件并提交版本库:

提交:

上传新文件:

首先查看git状态:

 提交到暂存区:

 提交到版本库:

上传: 

​编辑


删除:

拉取远程分支的更新:

git pull origin main

首先查看git状态:

git status

删除文件并提交版本库:

git rm example/Makefile example/testserver.cc 

git commit -m "Delete test"

提交:

git push origin main

上传新文件:

首先查看git状态:

git status

 提交到暂存区:

git add example/

 提交到版本库:

git commit -m "EchoServer test"

上传: 

git push origin main

猜你喜欢

转载自blog.csdn.net/super8ayan/article/details/132149512