Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7402

Closed
Open
Created Jul 30, 2014 by Administrator@rootOwner

WebUI shows branches, git branch -a does not.

Created by: garlandkr

I have recently imported repositories from Atlassian Stash into a fresh GitLab 7.x server. I used the following command to import:

bundle exec rake gitlab:import:repos RAILS_ENV=production

This worked fine and I have no errors after running the check. However, I can't see the branches or check them out from the cli. I can see the branches in the web ui and I can also download the ZIP files for the branch from the browser.

If I try to clone a specific branch I get an error:

fatal: Remote branch origin/branch_name_example not found in upstream origin

Here is my info output:

Instance method "lock!" is already defined in ActiveRecord::Base, use generic helper instead or set StateMachine::Machine.ignore_method_conflicts = true.

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.0.0p451
Gem Version:    2.0.14
Bundler Version:1.6.3
Rake Version:   10.3.2
Sidekiq Version:2.17.0

GitLab information
Version:        7.0.0
Revision:       4cce1b0
Directory:      /home/git/gitlab
DB Adapter:     mysql2
URL:            http://git.fq.dn
HTTP Clone URL: http://git.fq.dn/some-project.git
SSH Clone URL:  [email protected]:some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: google_oauth2

GitLab Shell
Version:        1.9.6
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

The branches also show up in console:

irb(main):056:0> Project.find(163).repository.branches
=> [#<Gitlab::Git::Branch:0x00000005fd76b8 @name="master",
@target="931a76bb983e6f699b517a598c16e2b2ed13e57b">,
#<Gitlab::Git::Branch:0x00000005fd53b8 @name="origin/4.1.1-b2.20130425",
@target="63d8b94cce11158cc6e48d4358c477e07b8fd8da">,
#<Gitlab::Git::Branch:0x00000005fdf430 @name="origin/4.10.0",
@target="440db947c0afeb1f7ff332f92dc6147ec4e548d5">,
#<Gitlab::Git::Branch:0x00000005fddef0 @name="origin/4.2.0-b3.20130516-ESP_PUREJSON",
@target="5c466e10fa23661b431e681878b2f1b4ec987586">,
#<Gitlab::Git::Branch:0x00000005fdce88 @name="origin/4.2.1",
@target="f30abf3fa57c2fd1c8690376369a864f66dd430d">,
#<Gitlab::Git::Branch:0x00000005fdcb68 @name="origin/4.2.2",
@target="e119e76dbae5e5fad60800bcfe0af17dd96915f6">,
#<Gitlab::Git::Branch:0x00000005fd6d80 @name="origin/4.3.0_mongodb_messagestore",
@target="16d10317657446b90e9788188ab48844f67a0010">,

After cloning, the .git/config looks like this:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    url = [email protected]:content-integration/esp-services.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
Assignee
Assign to
Time tracking