Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
TortoiseGit
TortoiseGit
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 295
    • Issues 295
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 8
    • Merge Requests 8
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3691

Closed
Open
Opened Dec 30, 2020 by Philippe Cloutier@chealer

No way to ignore files globally

What steps will reproduce the problem?

This is not a behavioral bug.

What is the expected output? What do you see instead?

This is not a behavioral bug.

What version of TortoiseGit and Git are you using? On what operating system?

TortoiseGit 2.11.0.0 with Git 2.29.3 on Windows 10

Please provide any additional information below.

TortoiseGit features a very convenient "Add to ignore list" menu to make Git ignore files. This feature even offers to ignore in several ways:

  • .gitignore in the repository root
  • .gitignore in the containing directories of the items
  • .git/info/exclude

Unfortunately, none of these is the way which would be most useful to me. As I use Eclipse and other IDE-s such as IntelliJ IDEA which create project files in the project's directory, I always need to ignore these (for example, at this moment, Eclipse's .settings folder and .project file). The best way for me to do this without polluting each project's repositories is to ignore them locally, which is also more efficient since I only need to do it once per Git install rather than once per project.

Until TortoiseGit allows this, this Medium article explains how to proceed using the command line, but has a couple errors:

  1. The value of core.excludesfile needs to match the created file's name (you should probably create a ".gitignore" instead of ".gitignore_global").
  2. Git Bash does not interpret "%USERPROFILE%". At least with Git Bash, your command should look like $ git config --global core.excludesfile "C:\Users\CLOP03\.gitignore".
Edited Jan 08, 2021 by Philippe Cloutier
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: tortoisegit/tortoisegit#3691