Can I make a user-specific gitignore file?

I want to change the gitignore, but not everyone on the team wants these changes. How can a user have their own specific git ignore file?

  • Git for Web Development (procedure method)
  • mercurial: apply a bugfix change from stable named branch to dev branch
  • Best practices for version control comments
  • Using Git with shared (symbolic link) directories
  • How can I find out how many commits in master are not in my branch?
  • git wildcard - remove all instances of a subdirectory
  • Gitlab: no user or key was provided
  • Mercurial Subrepositories: Prevent accidental recursive commits and pushes
  • 3 Solutions collect form web for “Can I make a user-specific gitignore file?”

    For user-specific and repo-specific file ignoring you should populate the following file:

    $GIT_DIR/info/exclude

    Usually $GIT_DIR stands for:

    your_repo_path/.git/

    You can create your own .gitignore using

    git config --global core.excludesfile $HOME/.gitignore
    

    Then put your desired entries in that file.

    In their .gitconfig:

    [core]
        excludesfile = ~/.global_gitignore
    

    That way, they can ignore certain types of files globally. Each user can have their own global ignore file.

    Git Baby is a git and github fan, let's start git clone.