You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment #1:
git version 2.5.0.windows.1
git-gui version 0.20.GITGUI
Windows 7 Pro 64-bit
Environment #2:
git version 1.7.9.msysgit.0
git-gui version 0.16.GITGUI
Windows Server 2003 R2 32-bit
Issue:
Cloning from Git GUI when the upstream repo has the default branch set to something other than master (say "develop") yields a local repository with a single branch named "master". This local master branch has no pull link, but it has a push link pointing to the origin/master, leading to a situation where a commit meant for origin/develop is instead pushed to origin/master. Note that this only happens when cloning from the Git GUI - using Git Bash creates a local develop branch pulling & pushing to origin/develop.
remote origin
Fetch URL: git@github.com:PrivateCo/mytestrepo.git
Push URL: git@github.com:PrivateCo/mytestrepo.git
HEAD branch: develop
Remote branches:
develop tracked
master tracked
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
6) $ git branch -avv
master 846504a 2nd test file, just for develop branch
remotes/origin/develop 846504a 2nd test file, just for develop branch
remotes/origin/master c2b577c initial commit with test file
Workaround (creates new develop branch, wipes out bad master, and recreates master):
Open Git Bash
$ cd /c/temp/mytestrepo
$ git checkout -b develop --track origin/develop
$ git branch -d master
$ git checkout -b master --track origin/master
$ git remote show origin
remote origin
Fetch URL: git@github.com:PrivateCo/mytestrepo.git
Push URL: git@github.com:PrivateCo/mytestrepo.git
HEAD branch: develop
Remote branches:
develop tracked
master tracked
Local branches configured for 'git pull':
develop merges with remote develop
master merges with remote master
Local refs configured for 'git push':
develop pushes to develop (up to date)
master pushes to master (up to date)
7) $ git branch -avv
develop 846504a [origin/develop] 2nd test file, just for develop branch
master c2b577c [origin/master] initial commit with test file
remotes/origin/develop 846504a 2nd test file, just for develop branch
remotes/origin/master c2b577c initial commit with test file
The text was updated successfully, but these errors were encountered:
I just verified that this happens also on Linux, so it is not a Windows-specific problem. Therefore I would like to ask you to report it to the Git mailing list: git@vger.kernel.org
Environment #1:
git version 2.5.0.windows.1
git-gui version 0.20.GITGUI
Windows 7 Pro 64-bit
Environment #2:
git version 1.7.9.msysgit.0
git-gui version 0.16.GITGUI
Windows Server 2003 R2 32-bit
Issue:
Cloning from Git GUI when the upstream repo has the default branch set to something other than master (say "develop") yields a local repository with a single branch named "master". This local master branch has no pull link, but it has a push link pointing to the origin/master, leading to a situation where a commit meant for origin/develop is instead pushed to origin/master. Note that this only happens when cloning from the Git GUI - using Git Bash creates a local develop branch pulling & pushing to origin/develop.
To reproduce (example uses fake repo):
Source Location: git@github.com:PrivateCo/mytestrepo.git
Target Directory: c:\temp\mytestrepo
Clone
Fetch URL: git@github.com:PrivateCo/mytestrepo.git
Push URL: git@github.com:PrivateCo/mytestrepo.git
HEAD branch: develop
Remote branches:
develop tracked
master tracked
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
6) $ git branch -avv
remotes/origin/develop 846504a 2nd test file, just for develop branch
remotes/origin/master c2b577c initial commit with test file
Workaround (creates new develop branch, wipes out bad master, and recreates master):
Fetch URL: git@github.com:PrivateCo/mytestrepo.git
Push URL: git@github.com:PrivateCo/mytestrepo.git
HEAD branch: develop
Remote branches:
develop tracked
master tracked
Local branches configured for 'git pull':
develop merges with remote develop
master merges with remote master
Local refs configured for 'git push':
develop pushes to develop (up to date)
master pushes to master (up to date)
7) $ git branch -avv
develop 846504a [origin/develop] 2nd test file, just for develop branch
remotes/origin/develop 846504a 2nd test file, just for develop branch
remotes/origin/master c2b577c initial commit with test file
The text was updated successfully, but these errors were encountered: