I am new to Git and am learning as much as I can about it.
The latest thing I would like to know is how to approach this problem: I have a single folder (
R) that I initially set up as a Git repository.
R up, it now contains several projects and it is now the case that I have several branches, each reflecting a different project and I don't like it because it feels untidy and disorganised.
As such, I am thinking that the best way to approach the problem might be to create a new repository for each project. (Note that each project is a sub-directory of
However, I know that creating a new repository means starting afresh (i.e. no branches or previous commits). Second - I'm sure the answer is yes - but I wonder if I can copy across a branch from
R where I used to track changes previously so that I can continue with the new project as a repository as opposed to being a sub-directory of another repository.
So I have two questions:
- Is it a good idea to split each project out into its own repository? (If so, will this affect the overall structure of
R? The idea is that I stop using
Ras a repository and instead use
R\Project2, etc, as separate repositories.)
- Is there a way to copy a branch from
Rinto the new repository?
Note: I am the sole developer/user of these files at present - no others are involved.