Getting a Git Repository
Local repository
A local repository is a repository (basically a folder) located in your hard drive. It is local as opposed to the remote repository which is hosted on Github, Bitbucket or other remote version control repository host.
To initialise a local repository, just change (cd
) into the directory which you would like to be a repository and enter git init
. This just marks the current directory as a repository.
NB: You only need to initialise a repository once.
Remote repository
A remote repository is hosted online. The most popular remote git repository host include Github, Bitbucket and Gitlab. Before initialising a repository, one has to create an account on one of these hosts afterwhich you just create a repository.
If you do not have a local copy of the repository, you might want to initialise the remote repository with a README and a LICENSE.
Henceforth, the basic procedure is:
git add <filename(s)>
git commit [-m][message]
git push [options]