Wednesday, April 27, 2022

Create a GIHUB Project Clone on your local machine using https

Some times you may want to download a copy of a github project to play around with the code. You may also be working on the project and need a fresh copy to make a change. Below are the commands to create a local copy of a project repo.

1) Make the project directory where you are going to work on the code.

2) Install GIT on your machine.

Command Prompt commands to use with in the project directory to create a fresh clone of our Repo on a new machine.

2) git init 


3) git remote add origin https://<user id you have on github>@github.com/<patch to project>


4) git config --global --add safe.directory <full project path>


5) git clone https://<user id you have on github>@github.com/<patch to project>

Example commands I used for a project:

git init

git remote add origin https://jfarrell423@github.utk.edu/oit/archibus_24.git


If you are not the author of the project you may need to execute this command below.

git config --global --add safe.directory E:/Work/archibus-dev


git clone https://jfarrell423@github.utk.edu/oit/archibus_24.git


No comments:

Post a Comment