This article will explain how to clone a git repository from a server to your local machine’s hard drive. This is the usual way you will download code to your machine for development.
$ cd /to/the/folder/you/want/to/save/code/in
Clone Repository From A Server
Use git clone to download the files from an online repository.
Rename the folder you just downloaded to the name of a new repo that you create on your personal public (or private) github account.
Push To GitHub
Navigate to the new folder on your computer that you just downloaded from GitHub.
Check the Orgin
Since we just downloaded these files from github. If we try to push them back to github, they will be pushed back to the origin. You can check the origin by using git remote -v
$ git remote -v
Outputs fetch and push as the GitHub URL you downloaded from.
Push To GitHub
Use git remote set-url origin to set where you want to push the folder. For example, a repository that you set up on your personal GitHub account.
Did you like this information? Please comment below.