Repositories
In Git, a collection of source and its history is called a repository. On a local machine, this is stored in the //.git/
directory. Forges also have repositories, typically called a “remote repository”.
Remotes
A remote is a connection between the local repository and one or more remote ones. These all have a name, but the most common is origin
.
$ git remote
origin
These remotes are how you “push” changes from the local to the remote or “pull” down changes from the remote into the current branch.
$ git push
$ git pull
Once on the remote, all the changes will be available to pull down to another machine or used in a pipeline.
Cloning
To create a local copy of a remote repository, you use the git clone
command. This requires a URL to clone from, which can be retrieve from the forge's project page.
With that URL, you can clone it. Since I use the command line, this is just:
git clone ssh://forgejo@src.mfgames.com/fedran-sources/sand-and-blood.git
What this will do is create a directory called sand-and-blood
in the current directory and set up the local repository. At the same time, it will set up the origin
remote.