Re: [git-users] How to merge seperate repositories as branches in new repository?

2013-10-21 Thread Casper Schmidt


Den mandag den 21. oktober 2013 09.56.53 UTC+2 skrev Casper Schmidt:
>
>
>
> Den lørdag den 19. oktober 2013 10.01.47 UTC+2 skrev Peter J Weisberg:
>>
>> On Oct 18, 2013 12:29 PM, "Casper Schmidt"  wrote:
>>
>> > My question is then: Is there any way to merge multiple repositories 
>> into a single repository but in their own branch. I have found a few 
>> guidelines using multiple remotes and simple merge but this merges the 
>> history into the master branch every time I try. Also some guidelines talk 
>> about merging repositories into seperate directories, but that is not 
>> really what we want.
>>
>> If I understand correctly (which I might not) , you don't actually want 
>> to "merge" anything.  You want to fetch from multiple remotes, then make 
>> local branches for each of them.  That's just 'git branch myNewBranch 
>> someRemote/master'.
>>
> Maybe merge is indeed the wrong term to use. I will try your suggestion 
> and get back later today :) 
>

Okay the git branch newBranch remote/master did the trick (that is not 
possible through SourceTree to my knowledge). What I would really like now 
(but it is secondary), is to avoid the master and newBranch trees/graph 
placed on top of each other (it makes it difficult to find the right graph 
once we have 15 branches on top of each other. Instead it could be nice to 
bind the branches together in a common parent (ie. the inital commit of 
master in the new repository). What is the best way to achieve this? Create 
a new branch from master and rebase my newBranch onto that or something 
else? 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] How to merge seperate repositories as branches in new repository?

2013-10-21 Thread Casper Schmidt


Den lørdag den 19. oktober 2013 10.01.47 UTC+2 skrev Peter J Weisberg:
>
> On Oct 18, 2013 12:29 PM, "Casper Schmidt" > 
> wrote:
>
> > My question is then: Is there any way to merge multiple repositories 
> into a single repository but in their own branch. I have found a few 
> guidelines using multiple remotes and simple merge but this merges the 
> history into the master branch every time I try. Also some guidelines talk 
> about merging repositories into seperate directories, but that is not 
> really what we want.
>
> If I understand correctly (which I might not) , you don't actually want to 
> "merge" anything.  You want to fetch from multiple remotes, then make local 
> branches for each of them.  That's just 'git branch myNewBranch 
> someRemote/master'.
>
Maybe merge is indeed the wrong term to use. I will try your suggestion and 
get back later today :) 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] How to merge seperate repositories as branches in new repository?

2013-10-21 Thread Casper Schmidt
Please se comments inline

Den lørdag den 19. oktober 2013 08.55.11 UTC+2 skrev Magnus Therning:
>
> On Fri, Oct 18, 2013 at 12:29:31PM -0700, Casper Schmidt wrote: 
> > Hi there 
> > 
> > Being quite new to the more advanced use of Git I really need some 
> > help here. I have been using the simple Git 
> > pull/fetch/commit/push/merge commands, which are pretty simple, for 
> > about 9 months so I 'm familiar with the concepts and basic commands 
> > of version control/Git. 
> > 
> > First some (probably) needed context: I work at a company where we 
> > receive releases of our product(s) from our HQ. Releases are rare 
> > though (maybe once a year) so most often we pull a copy from their 
> > development server (they use Visual Source Safe for version control, 
> > but I/we will be trying to convince them to change that). What we do 
> > for a living is customizing this HQ release to fit the needs of our 
> > customers. For this we have a repository for each customer. With 
> > around 10-15 active customers (customers that regularly place new 
> > orders for customizations) this has become a maintenance nightmare 
> > (keeping codebases up to date for all customers using beyond 
> > compare, even though it's a nice tool). All of this is old school 
> > ASP Classic and the codebases across customers (and HQ releases) 
> > should be at least 80% identical. Because of this we have looked 
> > into using a single repository for all of the code and then simply 
> > have each customer as a seperate branch (or multiple branches when 
> > developing new features for them). This will enable us to use pull 
> > requests and merges to update all customers easily and also make it 
> > easier to keep track of bugfixes that should be merged into the 
> > standard codebase from HQ. Because we have been using Git for quite 
> > some time we have a lot of development history for each customer 
> > that we would like to keep after migrating. 
> > 
> > My question is then: Is there any way to merge multiple repositories 
> > into a single repository but in their own branch. I have found a few 
> > guidelines using multiple remotes and simple merge but this merges 
> > the history into the master branch every time I try. Also some 
> > guidelines talk about merging repositories into seperate 
> > directories, but that is not really what we want. 
>
> The more I read this the less I'm sure I understand your question :-) 
>
> - Do you have multiple Git repos that you want to merge into one? 
>
Yes 

> - Do they all have a common history, i.e. when you add them as remotes 
>   to a local Git repo do their histories "line up"? 
>
No. They share 80% or more of the codebase but Git-wise they are completely 
unrelated as far as I know 

> - Git gives you lots of control over merging, so "this merges the 
>   history into the master branch every time" is confusing, maybe it'd 
>   help seeing what you have before, the command you use, what you 
>   expect would happen, and finally what actually happens. 
>
I have tried creating a new Repository. Copy the HQ fileset into Master, 
then branch from Master to ie. Branch1. After that I add a new remote and 
pull from that to the new branch (or so i believe, but it doesn't seem to 
work). I'm using SourceTree from AtLassian but might try the command line 
instead to be able to copy the exact commands here. 

>
> /M 
>
> -- 
> Magnus Therning  OpenPGP: 0xAB4DFBA4 
> email: mag...@therning.orgjabber: 
> mag...@therning.org 
> twitter: magthe   http://therning.org/magnus 
>
> Increasingly, people seem to misinterpret complexity as sophistication, 
> which is baffling--the incomprehensible should cause suspicion rather than 
> admiration. 
>  -- Niklaus Wirth 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] How to merge seperate repositories as branches in new repository?

2013-10-19 Thread PJ Weisberg
On Oct 18, 2013 12:29 PM, "Casper Schmidt"  wrote:

> My question is then: Is there any way to merge multiple repositories into
a single repository but in their own branch. I have found a few guidelines
using multiple remotes and simple merge but this merges the history into
the master branch every time I try. Also some guidelines talk about merging
repositories into seperate directories, but that is not really what we want.

If I understand correctly (which I might not) , you don't actually want to
"merge" anything.  You want to fetch from multiple remotes, then make local
branches for each of them.  That's just 'git branch myNewBranch
someRemote/master'.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] How to merge seperate repositories as branches in new repository?

2013-10-18 Thread Magnus Therning
On Fri, Oct 18, 2013 at 12:29:31PM -0700, Casper Schmidt wrote:
> Hi there
> 
> Being quite new to the more advanced use of Git I really need some
> help here. I have been using the simple Git
> pull/fetch/commit/push/merge commands, which are pretty simple, for
> about 9 months so I 'm familiar with the concepts and basic commands
> of version control/Git.
> 
> First some (probably) needed context: I work at a company where we
> receive releases of our product(s) from our HQ. Releases are rare
> though (maybe once a year) so most often we pull a copy from their
> development server (they use Visual Source Safe for version control,
> but I/we will be trying to convince them to change that). What we do
> for a living is customizing this HQ release to fit the needs of our
> customers. For this we have a repository for each customer. With
> around 10-15 active customers (customers that regularly place new
> orders for customizations) this has become a maintenance nightmare
> (keeping codebases up to date for all customers using beyond
> compare, even though it's a nice tool). All of this is old school
> ASP Classic and the codebases across customers (and HQ releases)
> should be at least 80% identical. Because of this we have looked
> into using a single repository for all of the code and then simply
> have each customer as a seperate branch (or multiple branches when
> developing new features for them). This will enable us to use pull
> requests and merges to update all customers easily and also make it
> easier to keep track of bugfixes that should be merged into the
> standard codebase from HQ. Because we have been using Git for quite
> some time we have a lot of development history for each customer
> that we would like to keep after migrating.
> 
> My question is then: Is there any way to merge multiple repositories
> into a single repository but in their own branch. I have found a few
> guidelines using multiple remotes and simple merge but this merges
> the history into the master branch every time I try. Also some
> guidelines talk about merging repositories into seperate
> directories, but that is not really what we want.

The more I read this the less I'm sure I understand your question :-)

- Do you have multiple Git repos that you want to merge into one?
- Do they all have a common history, i.e. when you add them as remotes
  to a local Git repo do their histories "line up"?
- Git gives you lots of control over merging, so "this merges the
  history into the master branch every time" is confusing, maybe it'd
  help seeing what you have before, the command you use, what you
  expect would happen, and finally what actually happens.

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Increasingly, people seem to misinterpret complexity as sophistication,
which is baffling--the incomprehensible should cause suspicion rather than
admiration.
 -- Niklaus Wirth


pgptbzzP12P7o.pgp
Description: PGP signature


[git-users] How to merge seperate repositories as branches in new repository?

2013-10-18 Thread Casper Schmidt
Hi there

Being quite new to the more advanced use of Git I really need some help 
here. I have been using the simple Git pull/fetch/commit/push/merge 
commands, which are pretty simple, for about 9 months so I 'm familiar with 
the concepts and basic commands of version control/Git.

First some (probably) needed context:
I work at a company where we receive releases of our product(s) from our 
HQ. Releases are rare though (maybe once a year) so most often we pull a 
copy from their development server (they use Visual Source Safe for version 
control, but I/we will be trying to convince them to change that). What we 
do for a living is customizing this HQ release to fit the needs of our 
customers. For this we have a repository for each customer. With around 
10-15 active customers (customers that regularly place new orders for 
customizations) this has become a maintenance nightmare (keeping codebases 
up to date for all customers using beyond compare, even though it's a nice 
tool). All of this is old school ASP Classic and the codebases across 
customers (and HQ releases) should be at least 80% identical. Because of 
this we have looked into using a single repository for all of the code and 
then simply have each customer as a seperate branch (or multiple branches 
when developing new features for them). This will enable us to use pull 
requests and merges to update all customers easily and also make it easier 
to keep track of bugfixes that should be merged into the standard codebase 
from HQ. Because we have been using Git for quite some time we have a lot 
of development history for each customer that we would like to keep after 
migrating.

My question is then: Is there any way to merge multiple repositories into a 
single repository but in their own branch. I have found a few guidelines 
using multiple remotes and simple merge but this merges the history into 
the master branch every time I try. Also some guidelines talk about merging 
repositories into seperate directories, but that is not really what we want.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.