Git Monkey
by mtwebster 7

I’ve been working on a little side project the last couple days.  A tool to solve my increasingly frustrating and time-consuming problem of maintaining and building the growing list of packages that makes up the Cinnamon software ‘stack.’  There were a  couple core things I wanted to accomplish: automate my git rebasing, and automate my building.

So I wrote Git Monkey

It won’t win any awards, definitely doesn’t adhere to proper HIG’s, but I find it works better than I even imagined it could, and it’s fairly functional as a development hub, at least for myself.

screenshot_area_2013-10-05_18:43:03

 

For now, it works off a configuration file, in which you list all projects you want to work with (I’ve included mine as a sample) – by providing the name of the project, the git remote name for upstream, and the upstream branch to pull against (generally master).

There are a number of operations you can currently do:

  • Rebase to current upstream master
  • git clean and git reset
  • Open a terminal in that project’s base folder
  • Build a project (only dpkg-buildpackage for now)
  • Clean/Reset all projects
  • Rebase all projects
  • Build all projects
  • Create a new branch for development
  • Check out a github pull request (just enter the PR number)

Everything is threaded (sort of) so the UI remains responsive during builds, but there is a queueing system, so only one build happens at a time, for instance, and every operation is cancellable.

I have more plans for it, but it’s pretty functional as is right now.  If I’m feeling adventurous maybe I’ll add it to a PPA eventually.  For now you can get the source at https://github.com/mtwebster/git-monkey.  Clone it, run dpkg-buildpackage from that folder, then install the resulting .deb (or, since there’s really only 3 files, you could instead just copy them to their appropriate locations).  I’ve got a sample config file that you can use to make your own, and place it in your home folder.  Once you’re all set up, just run git-monkey from the terminal.

Update 10/8/2013 – I’ve added this to a PPA, and made initial setup a bit more user-friendly.  Just run it, and you can add git repos on the fly.

PPA:  https://launchpad.net/~miketwebster/+archive/utilities

 

Ok have fun!

p5rn7vb

7 thoughts on “Git Monkey

  1. Reply Kirk M Oct 6, 2013 16:30

    Now that is (excuse the term) cool! And a darn good first effort. As you indicated, it’s not prefect but it’s a decent beginning and something you can build on and, eventually, others may be able to use to their advantage.

    Even though my career has spanned 30 years of computers (main frames and personal), peripherals, R&D and such, I’ve never had the type of mind that can wrap itself around programming and coding so I’m always impresses with those who have. And it’s always a bit concerning to me that so much work and responsibility is carried by one person when it comes to open source. When I was still working my career, “singular knowledge” (covers a broad range of things) was one of the most dangerous things for any business.

    I have no idea how things work as far as Linux Mint core developers of course, just thinking out loud I suppose.

  2. Reply twipley Oct 6, 2013 23:47

    If it can save you [x] in the long run, then it’s more than worth it. ;)

  3. Reply GamingOnLinux.com Oct 7, 2013 15:03

    Does it have a simple option to push code to master from a project folder? I really want to use git for my project but hate the terminal, a GUI like this with easy button pressing would rock.

  4. Reply ant Oct 8, 2013 12:35

    If there are unmet dependencies:
    sudo apt-get install python-async python-smmap libjs-jquery python-gitdb python-git

  5. Reply Rehdon Oct 9, 2013 19:36

    Anybody can point me to a fast and easy guide to git? I know something of SVN, but this one looks different. Thanks in advance and sorry for the off-topic (not much so if I become proficient in git, then I’ll surely have a use for your software mtwebster ;)

    Rehdon

Leave a Reply