Keeping track of multiple git repositories

I have quite a few git repositories, 2-3 of which I actively work in everyday. And for many reasons, I might not push commits everyday. Eventually, when I gain access to the internet, it's taxing to cd into each directory and run git status to check the additions in the repository and the commits that need to be pushed. Being me, I looked for an easy solution which would loop over all git repositories and tell me their status. And this is what I have found in due course -

This article talks about the use of third party tools such as Repo, gitslave, git submodules and git fusion. This describes one of the brilliant bash one-liners that can be used for the same with a much lengthy and less readable version here. Here is a solution in python, in contrast to the earlier ones which are all in bash. Uncommitted is another such solution in python, although it only supports hg and svn. Another simple bash one liner can be found here. Another third party tool, on part with the earlier ones mentioned, is gr. Based on my understanding of the problem and an implementation that I had in mind, I started looking for a way to create a list of sub-directories in a particular dir using bash, which led me to this solution. It's way easier to simply print the sub directories than it is to store them, as shown here.

Popular posts from this blog

Farewell to Enthought

Arxiv author affiliations using Python

Elementary (particle physics), my dear Watson