Git tracking entire home directory. Get error - fatal: bad default revision 'HEAD'

前端 未结 2 1103
猫巷女王i
猫巷女王i 2020-12-10 05:22

I\'m completely new to git. I\'m working in Mac Terminal.

Whenever I do a git status in my home directory, all untracked files, files in the stage direc

2条回答
  •  自闭症患者
    2020-12-10 05:57

    I'm not sure if this is what happened in your case, but you can get the error message from git log

    fatal: bad default revision 'HEAD'

    if you just made your repo, and you haven't made any commits in it yet. If this is your case, then simply add your files, commit them, and do the log again:

    $ git add "*"
    $ git commit -m "Your commit message"
    $ git log
    

提交回复
热议问题