S
S
Stanislav Shabalin2019-12-07 11:15:08
git
Stanislav Shabalin, 2019-12-07 11:15:08

Cloning an existing git project and then saving it to a new repository, what's the right way?

Tell me what is the best thing to do if you want to start a new project based on your base repository?
I created a project template and saved it on github. Now I need it for a new web project.
After cloning to the local computer, do I always have to delete the .git folder, do git init, go to the github server to create a new project, and then link the local project to the remote one and upload it, or is there an easier way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2019-12-07
@Starck43

for example like this:

git clone [email protected]:user-name/base-repo.git project-name
cd project-name
git remote remove origin
git remote add origin [email protected]:user-name/project-name.git
git push -u origin master

A
Andrey, 2019-12-07
@VladimirAndreev

Maybe the original project should be packaged as a composer package? Well, or whatever you have there ..
In the scheme with deletion, the question arises - how to update what the current project is made of

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question