I created the .gitignore_global
file and save it to the directory where i have .gitconfig
file.
After then, i used this command.
git config --global core.excludesfile .gitignore_global
then i checked my .gitconfig file by using the command
cat .gitconfig
It shows me result as
[user]
email = hemant.parihar264@gmail.com
name = Hemant Parihar
[gui]
recentrepo = C:/Users/heman/gitprojects
recentrepo = E:/Inspiration/developerquery
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[core]
excludesfile = .gitignore_global
It clear shows me in [core] section, there is .gitignore file
.
But in my project repository i created a file which should be ignored as i configure the .gitignore_global. But that should not happen. But when i used local .gitignore file to my project, it works fine and ignore the files which should not be tracked.
My project repository directory is E:/Inspiration/server/explore_california while .gitignore_global is in my home directory (where .gitconfig file is present.).
I checked this link but i did not find anything that is helpful.