How do I create a Git repository?

In order to use Git, you must first create a repository to store your files. Once created, you can then access the files in the repository using your Git client software on your computer (for example, by using the command-line ‘git’ tool or a GUI tool such as TortoiseGit).

Git provides the ability to create many clones of a repository and work on them independently (this being the primary characteristic of a Distributed Version Control System). However it is common practice to designate one repository to serve as the master, or ‘origin’, from which other repositories are derived.

To begin using Git at ProjectHut, it is first necessary to create a repository to serve as the origin for your project.

To create a new Git repository:
ProjectHut Git Menu
  1. Log in to the Control Panel using your ProjectHut account username and password.
  2. Click on the Git Repositories menu link.
  3. Click on the Create new Git Repository button.
  4. Enter a name for the repository (e.g. myproject). This name will serve as the base name of the repository URL, e.g. myproject.git
  5. Enter a description for the repository. This description will be displayed in the repository list and also on the Gitweb browser view as a reminder of the purpose of the repository.
  6. Click the Create button to create the Git repository.
  7. You will then be prompted to assign permissions to the repository. Select which Users and Groups you wish to grant access. These Users will have full read and write access to the repository.
  8. Click Update to apply the permissions.


Once you have finished creating the repository, you will be presented with an information screen which shows the Repository URL required to access the Git repository. You can now return to the repository list by clicking on the Git Repositories menu link. Here you will now find that the new repository is shown in the repository list.

Note: If you click on the orange coloured external link button corresponding to a Git repository, it will take you to the Gitweb page for this repository. You will be required to authenticate as one of the Users that were granted access on the permissions page in order to access Gitweb, and the repository itself.

For example, the URL for the myproject repository is of the form:

https://myaccount.projecthut.com/git/myproject.git

You also use this URL to access the repository from your Git client, as well as your web-browser.

See also:



  0 COMMENTS

Leave a Reply

Resources