Welcome to the Linux Foundation Forum!

How to write .gitconfig file

Where should I write this .gitconfig file?

[email protected]:~/linux_work$ gedit .gitconfig
[email protected]:~/linux_work$ git commit -s
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[email protected]:~/linux_work$

Comments

  • lagimenezlagimenez Posts: 1

    The .gitconfig needs to live either in your home directory (~/.gitconfig), which is what I would recommend, or inside your git repository (.git/config).

    The issue you have is that you are not in a git repository. You first need to either clone an existing one, or create one:

    git init linux_work
    cd linux_work
    [ add files  ]
    git add -A
    git commit -s
    

    That should work.

    Regards!

Sign In or Register to comment.