Easy Git Repository Summaries With Web-git-sum

For those hosting their own git repositories there are a number of solutions for creating convenient web-accessible front ends, but [mitxela] wasn’t quite satisfied with any of them. After trying a number of alternatives and reflecting on his requirements, he realized that all he really needed was a summary page listing the latest commits, and a file tree with a list of branches and tags. To accomplish this, he created web-git-sum. It’s a bash script that runs on git’s post-receive hook and generates only two files: a summary page and an index of the repository. You can see a demo of the output at git.mitxela.com.

[mitxela]’s writeup goes into some detail on how git repositories work, how those repositories are served over HTTP, and covers a few of the different options for providing convenient and accessible web front ends. Not all repositories are alike, and what works well for one may not work or scale well for another.

Intrigued by the idea of a private git server? We covered exactly how to set one up (spoiler: it’s really easy.)

16 thoughts on “Easy Git Repository Summaries With Web-git-sum

  1. “Intrigued by the idea of a private git server? We covered exactly how to set one up (spoiler: it’s really easy.)”

    More intrigued by the frontware that uses it as a back-end. Sure there’s a lot that can benefit from revision control, and not just programmers.

    1. Sure, but most commercial software is not designed with revision control in mind. There are two simple problems.
      1. Software projects are bunch of small files, and when you change only some of them, new revision will store only those files. Most commercial software store data in single file, and every revision will have to store everything.
      2. Software projects use simple text files that are easy to merge if two developers change the same file. Commercial software use some binary formats that can not be merged if two users change the same file.
      In the end you are better with old fashioned revision control known as daily copy.

      1. That’s actually not really true anymore. Word, Excel and Open Office, etc. are actually using XML formats (stored inside ZIP-files to bundle the files with a different extension than .zip).

          1. Yeah, sorry, just saying some software has improved in this regard.

            Not that anyone is actually automatically unpacking and packing the zip-files and committing the files separately as far as I know.

            Would be interesting to know what the results of that would be.

          2. Yes, i agree that some software and software fields have inmproved in that regard, which is great.

            Atleast in Libre office, you can save the documents in flat format (FODT), which is pure xml, no packing. Images are obviously integrated as binary data.

      2. “2. Software projects use simple text files that are easy to merge if two developers change the same file. Commercial software use some binary formats that can not be merged if two users change the same file.”

        Any commercial software that has use of revision control also usually doesn’t allow two workers to work on the same file at the same time. Its interesting to look at 3D modeling and how PDM is handled when you have multiple designers working on multiple assemblies with some of the same base components. Check outs, check ins, there are definitely more ways to do revision control than the way Git does it, Git is just optimized for software projects.

        “In the end you are better with old fashioned revision control known as daily copy.”
        That’s not revision control, that’s called a backup. Revision control is supposed to be able to contain some sort of method for documenting the difference in revisions. There are lots of ways to handle revision control outside of the way that Git does it even for those binary files you dont like, just because it isnt a text file doesn’t mean that it cant be compared either. The difference is that it usually requires integration into the commercial software that creates the files, like the PDM example from 3d modeling software (both dassault and autodesk have methods that third party PDM software can use for proper revisioning)

    1. I moved away from github 8 months ago for Gogs and it’s a really good option and very easy to setup. But I find it to be sometimes a bit to simplistic. What I miss the most when working with other people is the fact that one Pull Request can say “Closes #xx”. Not being able to comment in specific lines of code in PR’s is something I also miss a lot.
      If I knew what I know today I would have tried Gitlab instead.

  2. Set up a svn system on former client’s server about four years past and updated it 6 months past. Never any audit issues for code control.

    In the meantime, the young dev studs and studdetes installed a git box on their network, and the new young manager forced all to use. Last week, received some panic calls from management – their system got slammed by all NRTL audits and CIG and FDA audits (code control for medical boxes).

    Distributed control is not your friend for many industrial development environments. File control and naming are very important for software engineering.

    While my home system has svn, I am full of shit because I have several github accounts – ya know, do as I say, not as I do…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.