1

this may seem like a simple question, can I and how do i clone an existing repository for a new project, without changing / effecting that existing project?

I have two starter projects that I use as templates both include a few submodules, When I start a new project I'd like to clone that repository, and then get going with in my new repo with beanstalk or bitBuket.

any help would be appreciated.

note :

  • I'm not a terminal pro so.....
  • I use Tower for Git repo management with beanstalk and bitBucket

EDIT :

I'd be happy to take a crack at this with terminal if thats the way it needs to be done, to clarify my objective - I need to :

  • clone a local repository
  • initialize its submodules
  • share it with my team via bitbucket or beanstalk (ideally the second)

from whats been posted essentially I need to mimic the fork functionality and then be able to push that to one of the services mentioned.

bigmadwolf
  • 3,419
  • 3
  • 30
  • 44

3 Answers3

1

You can fork the repo and you can develop both of them independently

https://help.github.com/articles/fork-a-repo

Pradheep
  • 3,553
  • 1
  • 27
  • 35
  • 1
    not using github, and as with the above, this doesn't really clear it up for me, from looking at other questions on SO is forking is really just cloning without permissions and isn't really part of GIT which is why it seems to not exist in tower or beanstalk. – bigmadwolf Feb 12 '14 at 15:58
1

Fork it :)

and then you'll have 2 repositories to work on.

I don't really familiar with bitbucket, but you can see in their features there's a 'fork' option, as many other git applications:

fork in bitbucket

Aviram Netanel
  • 12,633
  • 9
  • 45
  • 69
  • 1
    okay great, that solves this if I'm using bitbucket, which is something I could look to do, for these with some shuffling... any idea on how to do this with a local repository and tower ? could I fork a local repo via terminal ? – bigmadwolf Feb 12 '14 at 15:48
  • 1
    or if I copy these files on my local machine, is there a way to make it pickup the sub mdbules ? – bigmadwolf Feb 12 '14 at 15:56
1

I'm not familiar with "Tower" you mentioned, so if you don't find a 'fork' option there (and if you don't want to try TortoiseGit or something else...) try this in the command line:

cd nameofdirectory
git init
git clone forkedURL

taken from this thread : "How to use Github using terminal commands?"

Community
  • 1
  • 1
Aviram Netanel
  • 12,633
  • 9
  • 45
  • 69
  • 1
    okay cool, so if I understand you correctly, the nameofdirectory is the directory of the new repository I want to create, I then initialize git and clone the repo into that directory ? will give it a go, but that seems to make sense... – bigmadwolf Feb 13 '14 at 10:25