If you followed along with the full guide on installing and serving GitWeb, you might be wondering what you can do with this program, and how it helps you manage Git projects. GitWeb gives you the power to view all of your remote Git repositories, track progress, view logs, with an attractive web interface. In this article, you will learn how to view your projects and interact with them to get information. You will also about how to share your projects and invite collaborators.
If you don’t need cPanel, don't pay for it. Only pay for what you need with our scalable Cloud VPS Hosting.
CentOS, Debian, or Ubuntu No Bloatware SSH and Root Access
How to View Projects in GitWeb
As you will remember from the installation process, you set up GitWeb to look into a certain directory to find your remote Git repositories. In the example used, this directory was located at
/var/lib/git and any subdirectories there would be initialized with a bare Git repository:
git init --bare
Once this is done, you will see the repository appear as a “Project” in the list on the main page.
You can view any of these projects by clicking on them. It’s that simple. Notice also how you can easily see other data like the Description, Owner, and Last Change.
You also get quick links to the project summary, shortlog, more detailed log, and the “tree” containing the project files.
Sharing Projects With Other Users
One of the primary benefits of GitWeb is giving you the ability to easily share projects with other people.
Downloading Source Code
If your site is publicly hosted, it’s easy for anyone to download a compressed file of your source code. Here’s how it works:
- View the project you want to download
- For the desired commit, click snapshot
This will automatically start a download (in compressed format) of a file containing all of the content in that commit. This is convenient if you want to test something in an older version, you can get access to any commit you desire without having to checkout older versions in your active project.
Since your site is running on a private server, opening your project to contribution from others requires some extra setup.
If you want to invite users to contribute code to your project, they will need their own SSH key. And then you will need to add the SSH public key to your server for that user:
- Log into your cloud server via SSH
- Copy the public key from the new user
- Paste the public key information into
Now your user should be able to clone a project with a basic
git clone command:
git clone [email protected]:/var/lib/git/project.git
Of course, be sure to substitute the example values above with the correct values.
Well done! You now know how to view and share projects in GitWeb. If you have any questions or comments feel free to drop them below.