Reputation: 10240
I have a file that holds IP configs for my local machine. This file must remain unchanged from the hosted version in github. I am using Atlassian SourceTree to check my files in but the options available do not work for me.
right-click - Remove (this deletes the file from my root I think)
right-click - Discard (this reverts my changes)
right-click - Stop Tracking (this creates a gitignore with the file path. It can't be ignored. it just needs to stay unchanged but able to be pulled)
My root structure looks like this
My exclude file contains /src/main/webapp/frontend/config/webpack/Base.js
Does anyone have any solution to this? Other questions here proposed the exclude folder approach but it's not working for me. AS you can see in the image the Base.js file is still in the Unstaged stack.
Thanks in advance
Upvotes: 0
Views: 48
Reputation: 11106
Although not through SourceTree, you can run the following command locally to achieve this
git update-index --assume-unchanged /src/main/webapp/frontend/config/webpack/Base.js
Upvotes: 1