How to remove a file from PR -Git

by Deepak Dhakal 14. October 2017 03:49

Let's say if you have three files but you want to not merge a File using PR. There is a way.

 

Switch to the branch

$ git checkout YourBranch

Override from the master:

git checkout origin/master -- src/main/java/yourfile.jsp

Commit and push it to the remote:

git commit -m "Removed a modified file from pull request"
git push origin YourBranch

Tags:

git

How to ignore files during merging to master in git

by Deepak Dhakal 13. October 2017 18:14

 

You have Branch A and you made many changes from the master but you do not want FileA to go to Master during merge even you change it. 

 

How to do it in git ?

Here git-update-index - Register file contents in the working tree to the index.

git update-index --assume-unchanged <PATH_OF_THE_FILE>

Example:-

git update-index --assume-unchanged somelocation/pom.xml

Tags:

git

Powered by BlogEngine.NET 1.5.0.7 - Old School Theme by n3o Web Designers