0

I want to ignore some changes of ~/myConfig/.config/smtube/smtube2.ini because SMTube keeps on saving the SMTube window position and size each time I close it :

$ cd ~/myConfig/.config/smtube/
$ git diff smtube2.ini
diff --git a/.config/smtube/smtube2.ini b/.config/smtube/smtube2.ini
index e40b4de..f2188a8 100644
--- a/.config/smtube/smtube2.ini
+++ b/.config/smtube/smtube2.ini
@@ -1,6 +1,6 @@
 [window]
 size=@Size(1227 679)
-pos=@Point(310 94)
+pos=@Point(133 94)
 font="Droid Sans,11,-1,5,50,0,0,0,0,0"
 style=gtk+

EDIT 1 : In fact, I want to ignore size= and pos= line changes of that tracked file.

How do I do that ?

SebMa
  • 4,037
  • 29
  • 39
  • `.gitignore` does not work on already tracked files. It only helps you avoid tracking them in the first place. – Lasse V. Karlsen May 11 '19 at 18:06
  • Possible duplicate of [Applying .gitignore to committed files](https://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files) – bk2204 May 11 '19 at 18:12
  • @bk2204 Please don't be mad : I noticed I was heading in the wrong direction so I added an EDIT1 – SebMa May 12 '19 at 00:04
  • You could temporarily replace the position with some fixed value, then commit, and restore the file (all via script). That way the position isn't ignored, but at least you don't get "dummy changes" all the time. – U. Windl May 12 '19 at 00:18

0 Answers0