0

How would I create a command/context menu option in VS Code, Source Control (GIT) window, which would recognize files I select under "Changes", and then allow me to choose "Assume Unchanged" from a context menu, and then it would perform: 'git update-index --assume-unchanged ' on all files selected?

Currently I need to perform this file by file, in shell, whenever I require this functionality, and it's annoying.

Has someone build this command (update-index) into their GIT extension (for VS Code -- there seems to be one for Visual Studio). For bonus points, it would also be useful to have the option to reverse it (Assume Changed), with --no-assume-unchanged switch.

torek
  • 448,244
  • 59
  • 642
  • 775
julius patta
  • 78
  • 1
  • 8
  • Are you trying to ignore changes to tracked files? If so, have you read [the Git FAQ entry on trying to do that](https://git-scm.com/docs/gitfaq#ignore-tracked-files)? – bk2204 Nov 02 '21 at 00:13
  • @bk2204 `--assume-unchanged` is useful for file systems that have a slow `lstat` system call, you mark files that do not need to be checked by git if they diff between work tree and index – rioV8 Nov 02 '21 at 00:45
  • Yes, I agree that is what it is intended for. However, that is not what it is usually used for, and as such I was asking if the OP was planning to misuse it (in which case they might not be interested in the answer) or if this was one of the rare cases where it is being used as intended (and a useful answer would be generally applicable). – bk2204 Nov 02 '21 at 00:49

1 Answers1

-1
  1. try some vs-code GIT extensions, git history, gitlens and so on
  2. the third-party software: fork, sourcetree good lucy