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 ?
To ignore files in your repository with GitHub Desktop go to the Repository menu and select Repository Settings… With the Repository Settings pop-up open, click the Ignored Files tab. Here you will be able to add file names, directory names, or patterns for Git to ignore in your repository.
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.
The . gitignore file tells Git which files to ignore when committing your project to the GitHub repository.
Local Repository . If there are some files you want to ignore for just this repository, you can put them in . git/info/exclude .
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With