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:
git pull
should not require this.
However if the pull causes a merge conflict, then it seems nessecary.
I ran into this error message whilst trying to commit some files.
Simply running git fetch
then trying my commit again worked for me.
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.
Update your bootstrap process to create a ${HOME}/.gitconfig
with the proper contents, or to copy an existing one from somewhere.
If you are using sourcetree: Repository -> Repository Settings --> Advanced --> uncheck "Use global user settings" box
worked great for me.
i use heroku cli 1. must use all user name and user email
$git config --global user.email .login email.
$git config --global user.name .heroku name.
git add *
5 git commit -m "after config user.name ,user email"
git push heroku master