0

I'm new to git and I'm trying to upload my local directory to my Github. However, when I'm asked to set my account's default identity

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

my terminal keeps giving me error:

error: could not lock config file C:/Users/marun/emacs/.gitconfig: No such file or directory

I downloaded emacs before but I deleted it since I seldom used it. How can I solve the problem? Thanks!

torek
  • 448,244
  • 59
  • 642
  • 775

1 Answers1

1

C:/Users/marun/emacs - that is probably set as you current home directory.

do the following to verify the theory.

echo $HOME

if it is the case, you need to reset your home directory: how to

Dmitry
  • 353
  • 2
  • 8
  • Thank you for answering! I check my home dir path, and it's "C:/Users/marun/" – MusicalChicken Sep 25 '21 at 21:10
  • Hi, my computer's home dir is "C:/Users/marun", but when I run the command in Git, it returns C:/Users/marun/emacs. How can I solve it? I think the solution in the post changes the home dir for the whole system? – MusicalChicken Sep 25 '21 at 21:32
  • 1
    how about that ? https://stackoverflow.com/questions/32538639/cannot-find-gitconfig-file – Dmitry Sep 25 '21 at 21:35