Git deletes files from remote repository and uploads new ones

Table of contents

delete:

Pull updates from the remote branch:

​edit

First check the git status:

​edit

Delete the file and commit to the repository:

submit:

Upload a new file:

First check the git status:

 Submit to the staging area:

 Submit to the repository:

Upload: 

​edit


delete:

Pull updates from the remote branch:

git pull origin main

First check the git status:

git status

Delete the file and commit to the repository:

git rm example/Makefile example/testserver.cc 

git commit -m "Delete test"

submit:

git push origin main

Upload a new file:

First check the git status:

git status

 Submit to the staging area:

git add example/

 Submit to the repository:

git commit -m "EchoServer test"

Upload: 

git push origin main

 

 

 

 

 

おすすめ

転載: blog.csdn.net/super8ayan/article/details/132149512