core.excludesfile and user.excludesfile in git

What is the difference between core.excludesfile and user.excludesfile in git repository?

I am using following code to exclude some of my configuration files but did not exlude my configuration file.

  • “git push” and “git push --tags” in the same command?
  • Add content of all directories that have a specified name
  • Can SonarQube fetch Data from a Git Repository?
  • Merge 2 different commit
  • Obtain a git repository's tree elsewhere via --work-tree while keeping --git-dir repository unmodified
  • Git doesn't recognize that files don't have changes
  • $ echo 'globals/js/config.js' > .gitignore_local
    $ git add .gitignore_local
    $ git config user.excludesfile .gitignore_local
    

    When I pull files from my local folder using

    $ git pull [remote_path_alias] master
    

    But config.js file update.

  • Is my git workflow correct and in accordance with my team?
  • How to make “git describe” mention the presence or absence of local changes?
  • git tag: Show only my tags?
  • How to know what differences that “git push” is going to push?
  • Export changed files & folders from multiple commit
  • A version control system with minimum space requirements on the client side, and is good with binaries
  • One Solution collect form web for “core.excludesfile and user.excludesfile in git”

    core.excludesfile is recognized by Git. user.excludesfile is not a valid git configuration setting.

    To set a configuration variable for a user you use (the slightly unfortunately named) --global with git config.

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