Re: [U-Boot] U-Boot panasonic repo

Hi.
I am trying to push to the newly-created u-boot-uniphier repo but I am in trouble.
masahiro@oscar:~/workspace/u-boot-uniphier$ git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git X11 forwarding request failed on channel 0 Total 0 (delta 0), reused 0 (delta 0) remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable to remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into remote: error: its current branch; however, this is not recommended unless you remote: error: arranged to update its work tree to match what you pushed in some remote: error: other way. remote: error: remote: error: To squelch this message and still keep the default behaviour, set remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git'
According to this error message, it looks like the u-boot-uniphier on the denx server has been created as a non-bare repository, right?
The message also recommended to do "git config receive.denyCurrentBranch ignore" on the remote repo, but I seems impossible for me to do that.
Someone, give me a tip if I am missing something.
Perhaps, the repo should be re-created as a bare one? Or could you add "receive.denyCurrentBranch ignore" configuration, Wolfgang?

Dear Masahiro,
In message CAMhH57Rx8VLZ9fL6OXeyJMWwnSKTg36dTERENm0YVQcLPRuqVg@mail.gmail.com you wrote:
I am trying to push to the newly-created u-boot-uniphier repo but I am in trouble.
masahiro@oscar:~/workspace/u-boot-uniphier$ git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git
...
remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent
I recommend to always explicitly tell which branch you are trying to push where.
For example, if your local branch which you are preparing for a pull request is "for-upstream", then your push command would look like this:
git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier for-upstream:master
Best regards,
Wolfgang Denk

Hi Wolfgang,
2014-09-27 22:00 GMT+09:00 Wolfgang Denk wd@denx.de:
Dear Masahiro,
In message CAMhH57Rx8VLZ9fL6OXeyJMWwnSKTg36dTERENm0YVQcLPRuqVg@mail.gmail.com you wrote:
I am trying to push to the newly-created u-boot-uniphier repo but I am in trouble.
masahiro@oscar:~/workspace/u-boot-uniphier$ git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git
...
remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent
I recommend to always explicitly tell which branch you are trying to push where.
For example, if your local branch which you are preparing for a pull request is "for-upstream", then your push command would look like this:
git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier for-upstream:master
I am afraid your recommendation won't solve the problem I am having now.
I can create a new branch on the remote u-boot-uniphier.git but I cannot update the master branch.
$ git --version git version 1.9.1 masahiro@oscar:~/workspace/u-boot-uniphier$ git branch * master masahiro@oscar:~/workspace/u-boot-uniphier$ git describe v2014.10-rc2-274-gf9860cf masahiro@oscar:~/workspace/u-boot-uniphier$ git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git master:master X11 forwarding request failed on channel 0 Total 0 (delta 0), reused 0 (delta 0) remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable to remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into remote: error: its current branch; however, this is not recommended unless you remote: error: arranged to update its work tree to match what you pushed in some remote: error: other way. remote: error: remote: error: To squelch this message and still keep the default behaviour, set remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git' masahiro@oscar:~/workspace/u-boot-uniphier$ git checkout -b for-upstream Switched to a new branch 'for-upstream' masahiro@oscar:~/workspace/u-boot-uniphier$ git branch * for-upstream master masahiro@oscar:~/workspace/u-boot-uniphier$ git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git for-upstream:master X11 forwarding request failed on channel 0 Total 0 (delta 0), reused 0 (delta 0) remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable to remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into remote: error: its current branch; however, this is not recommended unless you remote: error: arranged to update its work tree to match what you pushed in some remote: error: other way. remote: error: remote: error: To squelch this message and still keep the default behaviour, set remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git ! [remote rejected] for-upstream -> master (branch is currently checked out) error: failed to push some refs to 'ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git' masahiro@oscar:~/workspace/u-boot-uniphier$ git push ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git for-upstream:for-upstream X11 forwarding request failed on channel 0 Total 0 (delta 0), reused 0 (delta 0) To ssh://gu-uniphier@git.denx.de/u-boot-uniphier.git * [new branch] for-upstream -> for-upstream
The error message is saying that the remote u-boot-uniphier is a non-bare repository and the 'master' branch is already checked out (commit 9170818a4e004af7893fa0113f6e5b4afafded55). That is why I cannot update the master branch, I think.
When I create a repo just for pushing to and fetching from, I use "--bare" option.
Why not for the u-boot-uniphier.git on git.denx.de ?
Is anyone doing his work on that repo?

Dear Masahiro,
In message CAMhH57Tp302tcPwTFPu5stNzcBH491t8tDLEESb-7XhMzuBU2w@mail.gmail.com you wrote:
I can create a new branch on the remote u-boot-uniphier.git but I cannot update the master branch.
Please try again now.
Best regards,
Wolfgang Denk

Hi Wolfgang,
2014-09-28 0:57 GMT+09:00 Wolfgang Denk wd@denx.de:
Dear Masahiro,
In message CAMhH57Tp302tcPwTFPu5stNzcBH491t8tDLEESb-7XhMzuBU2w@mail.gmail.com you wrote:
I can create a new branch on the remote u-boot-uniphier.git but I cannot update the master branch.
Please try again now.
Everything looks working fine now.
Thank you!!
participants (2)
-
Masahiro YAMADA
-
Wolfgang Denk