简体   繁体   中英

Delete a git file from branch after commiting

I used git pull origin master to solve a conflict, now my files have been pulled from my master to my source branch, which is not what I wanted, I tried to delete them directly from Intelij, but my PR looks like this:

enter image description here

How can I delete the files that I do not want to my PR? Thanks

git rm should remove the file, but you need to commit the changes

Are the files you don't want from the master source? Then you can use

git reset --hard

you can only use

git merge --no-ff origin/<branch-name> 

to get the changes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM