Use this Git PowerTip for Sensitive Info

Published: 08 January 2023
on channel: Ray Villalobos
3,332
154

You've got a file with some sensitive info.

So you want it to push to GitHub with template content.
But you want a local version of the file to have your real data. Problem is, if I change it, Git will track it and push it to GitHub overriding my template.

You can tell Git to ignore just that file with:
git update-index --assume-unchanged FILENAME

You'll notice that Git is not tracking it anymore. To change it back, just change the command to

git update-index --no-assume-unchanged FILENAME

Follow Me
=======
Blog: https://raybo.org
LinkedIn:   / planetoftheweb  
Twitter:   / planetoftheweb  


Watch video Use this Git PowerTip for Sensitive Info online without registration, duration hours minute second in high quality. This video was added by user Ray Villalobos 08 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,33 once and liked it 15 people.