I want to run git update-index --no-skip-worktree C:\dev\src\Folder\MyFile.cs
from python script", but I encountered 2 problems:
- My script doesn't run from the git folder, so I need to somehow make it understand this is a git repo. I saw
git -C
should help but wasn't able to make it work. - I tried using subprocess.run and subprocess.Popen, but I get return code 0 and the file is not ignored.
How can I run it from my script? Thanks!