0

I added an .fla file to a git respository, but I changed my mind and now I'd like to exclude it from my commits.

Is there any way to exclude it and not delete it from the repository or my local?

redconservatory
  • 21,438
  • 40
  • 120
  • 189

2 Answers2

1

Try this:

git update-index --assume-unchanged [filename(s)]

From the man page:

--assume-unchanged, --no-assume-unchanged

When these flags are specified, the object name recorded for the paths are not updated. Instead, these options sets and unsets the "assume unchanged" bit for the paths. When the "assume unchanged" bit is on, git stops checking the working tree files for possible modifications, so you need to manually unset the bit to tell git when you change the working tree file. This is sometimes helpful when working with a big project on a filesystem that has very slow lstat(2) system call (e.g. cifs).

Graham Borland
  • 60,055
  • 21
  • 138
  • 179
0

Reference one of my questions:

How to modify a specified commit in git?

and Change all the commits that you want to exclude the file.

Community
  • 1
  • 1
Sam Liao
  • 43,637
  • 15
  • 53
  • 61