git push fails: `refusing to update checked out branch: refs/heads/master`

后端 未结 6 1971
抹茶落季
抹茶落季 2020-12-04 17:48

I want to store my local modifications to JBoss config in git. For this, I have set up the following structure:

lrwxrwxrwx  1 jboss jboss        19 Jan 24 11         


        
6条回答
  •  [愿得一人]
    2020-12-04 18:03

    I know this is quite an old question, but if you go with git init --bare, watch out for 'GIT_DIR=.' which will be set for a bare repo hook if using hooks to checkout the repo after pushing. Use 'export GIT_DIR=.git' in your hook routine to make it recognise the repo you are pulling into....

提交回复
热议问题