Repository does not show newly created git branches, how do I get them to show up?
Added by Beau Simensen over 13 years ago
I'm trying to figure out what I need to do to get some newly created branches to show up in the branches drop down on the repository browser. Am I missing a step somewhere or does the git branch support for Redmine not actually work yet?
Master works just fine. Just cannot see two newly created branches.
Replies (4)
RE: Repository does not show newly created git branches, how do I get them to show up?
-
Added by Toshi MARUYAMA over 13 years ago
Is your repository bare?
RE: Repository does not show newly created git branches, how do I get them to show up?
-
Added by Beau Simensen over 13 years ago
Yes, I have believe it is a bare repository.
halo-php.git$ git status fatal: This operation must be run in a work tree halo-php.git$ git branch -a * master remotes/origin/0.0 remotes/origin/0.1 remotes/origin/master halo-php.git$ git branch * master halo-php.git$
RE: Repository does not show newly created git branches, how do I get them to show up?
-
Added by Toshi MARUYAMA over 13 years ago
Redmine runs "git branch" at source:/tags/1.0.4/lib/redmine/scm/adapters/git_adapter.rb#L38 .
RE: Repository does not show newly created git branches, how do I get them to show up?
-
Added by Beau Simensen over 13 years ago
I see. So I ran:
git branch --track 0.0 origin/0.0 git branch --track 0.1 origin/0.1
This seems to have worked. Is there another way that would have been better for me to do this?
Also, I have some generic code in a couple of plugins/hooks that looks like this:
git reset --soft refs/remotes/origin/master
I do not know enough about git to know whether or not this needs to be done for each of my branches or not. I'm hoping not as doing this would probably make my plugins unusable as they would have to be specific to each project's branches.