A
A
Adzhetygenov2017-02-01 17:09:48
git
Adzhetygenov, 2017-02-01 17:09:48

How to copy an existing repository to a new one?

Good time. Got a question. Each time to collect the project on a new one - hemorrhoids. I decided to make a minimal skeleton, where I set up a gallop, tasks, etc. Created a repository and merged these files into it. So here's the question. If I create a new repository, how do I copy the files from the skeleton to the new repository so that any changes are made to the files in the new repository and not in the skeleton repo.
Ps The question is stupid, but why do I ask, if I clone a new empty repository, by default remote will have the repository that I cloned, if I clone the site skeleton into it, where will it send changes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2017-02-01
@Casufi

1) git clone --depth 1 ssh://[email protected]/user/repo1.git 
2) cd repo1
3) git remote add origin ssh://[email protected]/user/repo2.git 
4) git push -u origin master

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question