Skip to main content

Posts

Showing posts from October, 2023

Clone/Copy Existing Code to New Code Repo in Git

How to Clone/Copy Existing Code to New Code Repo in Git? Clone Existing repo to new directory                 $git clone git@github.com:org/old-repo.git C:\GitHub\code-cov-test  go to code-cov-test dir                $cd ../code-cov-test Remove old repo git                 $rm -rf .git #if this command doesn't work go to directory and remove .git file which is hidden Do git initialization                $git init  Add all files to git                $git add . Commit the local changes                 $git commit -m "Initial Commit" Add new repo as remote if repo not present create new repo                $git remote add origin git@github.com:org/co...