Git and cloning

Posted by jriff on Stack Overflow See other posts from Stack Overflow or by jriff
Published on 2010-05-04T05:54:55Z Indexed on 2010/05/04 6:08 UTC
Read the original article Hit count: 242

Filed under:
|

Hi all!

I have done an app for a client called 'A' (not really).

I have found out that it is very cool and that I want to sell it to other clients also. The directory 'A' is a Git repository. I think I have a problem with cloning it. As far as I can see I need to make a copy of the dir 'A' and call it 'Generic_A'. Then delete the dir 'A' and do a "git clone Generic_A A" Then I could start changing the 'Generic_A'-repo with a generic design and all client references removed. But that is kind of the other way around. I should have started doing the generic design and then cloned the repo to change to the client specific design.

Can I:

  1. make a new branch
  2. do all the changes to make the design generic
  3. create a patch that reflects the changes between the two
  4. remove the client specific branch
  5. rename the directory to 'Generic_A'
  6. clone the repo to a new dir 'A'
  7. apply the patch to get the client specific stuff back

And if yes - how do I make the patch and apply it?

Regards,

Jacob

© Stack Overflow or respective owner

Related posts about git

Related posts about project-management