0

I am new to GIT and stash code management. i am working on the GIT to stash code migration. As of now we are having single GIT repository in which multiple modules exists which can be regroup in different multiple repositories. Now i have to segregate the code into multiple repositories in stash.

For Example : current GIT repository repo.git contains the directory in below structure :

A (repository) --
  |--- A1 (module)
         |-- A1.1 (submodule)
         |-- A1.2
  |--- A2
         |-- A2.1
         |-- A2.2
         |-- A2.3
  |--- A3
         |-- A3.1

what i need is to divide code in stash as below :

A1 (repository)
  |-- A1.1 (module)
  |-- A1.2
  |-- A2.1
  |-- A2.2
A2
  |-- A2.3
  |-- A3.1

How can i move code from GIT to stash with history??

Thanks in advance.

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
kuldeep
  • 15
  • 5
  • `git stash` is a command for taking your working index and shelving it temporarily, thus allowing you to proceed with other things. You seem to be wanting to create a new directory structure, which doesn't necessarily have anything to do with Git. Can you clarify your question? – Tim Biegeleisen Jan 19 '16 at 06:01
  • Yes Tim, we are moving from GIT to atlassian stash. where we are refactoring the code and creating new directory structure as per design. I had tried in simple way just checking out the code and pushing it after changing the remote url. Code has been moved successfully but GIT history is not showing there. – kuldeep Jan 19 '16 at 06:11
  • look at this answer: http://stackoverflow.com/a/17864475/2082964 – Chris Maes Jan 19 '16 at 06:55
  • Possible duplicate of [Detach subdirectory into separate Git repository](http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository) – Chris Maes Jan 19 '16 at 06:55

0 Answers0