How To View Projects in GitWeb

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.

check markCentOS, Debian, or Ubuntu check markNo Bloatware check markSSH 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.

View any project in GitWeb by clicking on the link
You can view any project in your GitWeb server by simply clicking the link.

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:

  1. View the project you want to download
  2. 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.

Collaborate

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:

  1. Log into your cloud server via SSH
  2. Copy the public key from the new user
  3. Paste the public key information into .ssh/authorized_keys file

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.

CM
Christopher Maiorana Content Writer II

Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.

More Articles by Christopher

Was this article helpful? Join the conversation!

Server Madness Sale
Score Big with Savings up to 99% Off

X