Reputation: 10101
.git/config 1
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://[email protected]//repositories/plugins/myproject.git
[branch "master"]
remote = origin
merge = refs/heads/master
.git/config 2
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://[email protected]//repositories/plugins/myproject.git
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "develop"]
remote = origin
merge = refs/heads/develop]
However, on both repositories, when I typed branch -a
, both return
git branch -a
* develop
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/master
Upvotes: 3
Views: 219
Reputation: 5480
You don't have branch develop
tracking a branch on the remote repository in the first one.
To see the difference run git branch -avv
on each repository. This will show all branches (local and remote), what commit each is on and which remote branches (if any) are tracked by each local branch.
Upvotes: 3
Reputation: 3765
If you try to pull from the develop branch of the repo that does not define [branch "develop"]
using git pull
, you will get an error complaining that you haven't specified a remote branch. Git will suggest that you run git branch --set-upstream develop origin/develop
in order to create that entry and properly track the remote branch.
Upvotes: 3