Welcome to the Linux Foundation Forum!

How to write .gitconfig file

Where should I write this .gitconfig file?

aranya@aranya-HP-Pavilion-Notebook:~/linux_work$ gedit .gitconfig
aranya@aranya-HP-Pavilion-Notebook:~/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).
aranya@aranya-HP-Pavilion-Notebook:~/linux_work$

Comments

  • 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:

    1. git init linux_work
    2. cd linux_work
    3. [ add files ]
    4. git add -A
    5. git commit -s

    That should work.

    Regards!

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training