Janis Lesinskis' Blog

Assorted ramblings

  • All entries
  • About me
  • Projects
  • Economics
  • Misc
  • Software-engineering
  • Sports

Git preview for a single file?


Sometimes I write articles that are short or frivolous that require less effort, but sometimes I spend a lot more effort on an article like the one about the 2020 toilet paper shortage or the recent history of the Australian airline industry in the post pandemic era. With the more in depth articles I have had considerable discussions and feedback from friends before these went live. Many people have helped me with suggestions for edits made and quality discussions, I'd like to first thank everyone who's helped me with feedback, it has been extremely helpful.

This blog is powered by text documents stored in the Git version control system and is built into the web pages you see using Pelican which is a static site generator. This enables me to keep track of changes easily and edit my content over time while keeping the editing process quite straightforward. When I'm creating content with a team I've found we often use some sort of Git based workflow for collaborative editing, here's one such workflow I have been using with content creators lately. I've realized that there's a bit of an annoying step that seems to happen each time with the editing process when seeking feedback from others from outside the team. I take a copy of the work I'm writing and share it with someone via some external means then get the comments back and merge it back into the text I've been working on.

Distributed editing is the whole workflow that Git is supposed to make easy and yet I'm actively circumventing this when I'm seeking external feedback. There's a few really heavy things in the repository that powers this site and I'd really like to be able to share a subset of the files with other people and to not work around Git like this.

I know I'm not the only person to run into this, recently I've had multiple people contact me for feedback on non-public materials:

  • Someone was writing some code and wanted feedback on a single file on a new feature for a product
  • Someone wanted me to have a look over a page of internal documentation
  • Someone wanted me to comment on a proposal that was soon to be submitted

In each of these cases the work was already stored in a private Git repository but was shared to me via some other non-version controlled means. In a public project I could just open up a Pull Request to suggest changes, but in each of these cases the repository was not public. Collaboration would have been much easier if there was some way in which just the single file that was of interest could have been shared. I'd love to be able to suggest edits and have other people suggest edits to me without us having to leave the version control ecosystem since this would allow me to use the power of the version control system itself to merge in suggestions. This would also allow me to preserve an accurate history of changes which would make attributions much easier to manage over time (a simple git blame would show who's changes were used in any given file).

Published: Sun 21 June 2020
By Janis Lesinskis
In Software-engineering
Tags: git collaboration editing

links

  • JaggedVerge

social

  • My GitHub page
  • LinkedIn

Proudly powered by Pelican, which takes great advantage of Python.