• Home
  • Portfolio
  • Articles
  • Pricing
  • About
  • Contact

How to clone your own repo in github

Oct 19th, 2019

Alex Quasar

githubgithow to clone your own repo with the commit history intact

In a new folder you want the project to be in

git clone <your-template-repo-url>

Change the remote url of your project, you do not want to overwrite your template

git remote set-url origin<username>/<your-new-project-name>

Now create a new repo from the command line (press enter a couple timesgit init

git add
git commit -m "first commit"
git remote add origin<username>/<your-new-project-name>.git
git push -u origin maste

Even faster go to github and select create new repo button and give your project a name a description, after continuing you should get the code to create a new repo and paste that into your code editor.

Now you will have a cloned repo with the original untouched and the full original commit history.