All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug Report: git gui clones non-master default branch as master
@ 2015-09-03 17:01 John Medema
  2015-09-18 19:10 ` John Medema
  0 siblings, 1 reply; 2+ messages in thread
From: John Medema @ 2015-09-03 17:01 UTC (permalink / raw)
  To: git, SysAdmin, IT Dev2

Git gurus, your assistance is needed.

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

Environment #3:
Linux (check with dscho, https://github.com/git-for-windows/git/issues/345)

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):
1) Open Git GUI
2) Click "Clone Existing Repository"
Source Location: git@github.com:PrivateCo/mytestrepo.git
Target Directory: c:\temp\mytestrepo
Clone
3) Open Git Bash
4) $ cd /c/temp/mytestrepo
5) $ 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 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):
1) Open Git Bash
2) $ cd /c/temp/mytestrepo
3) $ git checkout -b develop --track origin/develop
4) $ git branch -d master
5) $ git checkout -b master --track origin/master
6) $ 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


Let me know if you need any more information.

John Medema
Systems Administrator
United Drugs, a Subsidiary of AAP (American Associated Pharmacies)
john.medema@uniteddrugs.com
7243 N 16th Street, Phoenix, AZ 85020
Office:  602-678-1179 x126
Fax:  602-639-4631

-- 
HIPAA NOTICE:  It is against United Drugs’ policy to receive or send 
un-encrypted or non-secured email correspondence containing Protected 
Health Information (PHI) as defined by HIPAA law.
 
Please use fax or phone for correspondence containing PHI.

-- 
This email message is for the sole use of the intended recipient(s) and may 
contain confidential and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended 
recipient, contact the sender by reply email, and destroy all copies of the 
original message. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug Report: git gui clones non-master default branch as master
  2015-09-03 17:01 Bug Report: git gui clones non-master default branch as master John Medema
@ 2015-09-18 19:10 ` John Medema
  0 siblings, 0 replies; 2+ messages in thread
From: John Medema @ 2015-09-18 19:10 UTC (permalink / raw)
  To: git, SysAdmin, IT Dev2

Git devs,

Can I get a confirmation that someone has confirmed this as a bug?
And that it is in a queue somewhere for eventual fixing?

Thanks,

John Medema
Systems Administrator
United Drugs, a Subsidiary of AAP (American Associated Pharmacies)
john.medema@uniteddrugs.com
7243 N 16th Street, Phoenix, AZ 85020
Office:  602-678-1179 x126
Fax:  602-639-4631


On Thu, Sep 3, 2015 at 10:01 AM, John Medema
<john.medema@uniteddrugs.com> wrote:
> Git gurus, your assistance is needed.
>
> 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
>
> Environment #3:
> Linux (check with dscho, https://github.com/git-for-windows/git/issues/345)
>
> 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):
> 1) Open Git GUI
> 2) Click "Clone Existing Repository"
> Source Location: git@github.com:PrivateCo/mytestrepo.git
> Target Directory: c:\temp\mytestrepo
> Clone
> 3) Open Git Bash
> 4) $ cd /c/temp/mytestrepo
> 5) $ 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 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):
> 1) Open Git Bash
> 2) $ cd /c/temp/mytestrepo
> 3) $ git checkout -b develop --track origin/develop
> 4) $ git branch -d master
> 5) $ git checkout -b master --track origin/master
> 6) $ 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
>
>
> Let me know if you need any more information.
>
> John Medema
> Systems Administrator
> United Drugs, a Subsidiary of AAP (American Associated Pharmacies)
> john.medema@uniteddrugs.com
> 7243 N 16th Street, Phoenix, AZ 85020
> Office:  602-678-1179 x126
> Fax:  602-639-4631

-- 
HIPAA NOTICE:  It is against United Drugs’ policy to receive or send 
un-encrypted or non-secured email correspondence containing Protected 
Health Information (PHI) as defined by HIPAA law.
 
Please use fax or phone for correspondence containing PHI.

-- 
This email message is for the sole use of the intended recipient(s) and may 
contain confidential and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended 
recipient, contact the sender by reply email, and destroy all copies of the 
original message. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-18 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03 17:01 Bug Report: git gui clones non-master default branch as master John Medema
2015-09-18 19:10 ` John Medema

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.