Git: “please tell me who you are” error

前端 未结 21 1655
傲寒
傲寒 2020-11-30 16:21

I have app servers that I bootstrap together using Chef + some ad-hoc bash scripts. The problem is, when I want to run an update on one of these app servers, I get:

21条回答
  •  隐瞒了意图╮
    2020-11-30 16:37

    Instead of doing a git pull, you can do:

    git fetch
    git reset --hard origin/master
    

    Neither of those require you to configure your git user name / email.

    This will destroy any uncommitted local changes / commits, and will leave your HEAD pointing to a commit (not a branch). But neither of those should be a problem for an app server since you shouldn't be making local changes or committing to that repository.

提交回复
热议问题