add new post (stop tracking file changes with git)

main
Dominic Reich 2 years ago
parent 8cb46b82ad
commit af694356d0
Signed by: dominic
GPG Key ID: BC9D6AE1A3BE169A

@ -0,0 +1,30 @@
+++
# vim: ft=markdown
title = 'Stop tracking changes of a file with git'
summary = '''Don't overuse this; it could get a bit more complicated to track
down errors when ignoring changes of files...'''
date = '2023-06-04T18:00:51+02:00'
# lastmod = ''
categories = [ 'computerstuff' ]
tags = [ 'git', 'linux', 'freebsd' ]
+++
For very rare situations this git command is very handy. I use this on my
_dotfiles_ repository on a config file that I don't need to update recent
changes (like htoprc).
## Ignore an already tracked file
```console
$ git update-index --assume-unchanged <filename>
```
## Start tracking again
```console
$ git update-index --no-assume-unchanged <filename>
```
Source: <https://stackoverflow.com/a/23673910>
Loading…
Cancel
Save