I'm using the git-gui
interface to manage my git
project. Despite being ugly –tcl-tk
– it's one of the most complete interface out there.
However, I can't find how to ignore files from this interface ?
I'm using the git-gui
interface to manage my git
project. Despite being ugly –tcl-tk
– it's one of the most complete interface out there.
However, I can't find how to ignore files from this interface ?
the pragmatic way is, to add this to your git
configuration:
git config --global guitool."Add to .gitignore".cmd $'echo "\n$FILENAME" >> .gitignore & git add .gitignore'
git config --global guitool."Add to .gitignore".needsfile yes
git config --global guitool."Add to .gitignore".confirm yes
After that, you can use it under Tools > Ignore selected file
in your git gui
.
Select a file you want to ignore under Unstaged Changes -> Tools/ignore selected file
If you mean ignore them forever, then add a .gitignore
file in the root of your directory (where the .git
folder is). List the files or file types separated by a new line like so:
*.pyc
venv
.metadata
If you mean ignoring it temporarily, you can do the .gitignore
step or just stage the files you want to commit individually.
If you set it in your .gitconfig file, the GUI will comply.
Add this to your .gitconfig
(should be located under c:\users\USERNAME)
[core]
excludesfile = ~/.gitignore
Then create a file c:\users\USERNAME\.gitignore
and add the ignore files to that.
You can try to add all the files first. After that go to git gui, choose those files you want to ignore in "Staged Changes" and press Ctrl-U.