Writing a Git package


I’m working on a package for displaying a more detailed view of Git status for a project. One thing I often do is run git status just to give myself a general sense of what I’ve been doing. This package is initially a nicer version of that command. At a later point I hope to add other functionality.

One thing I haven’t managed to do is find a way to display which files are staged and which are not. Looking at the docs for git-utils there doesn’t appear to be any reference to staging.

I understand Git — and consequently libgit2 —can be a bit esoteric at times, so there is the possibility of being able to do it in a round-about way. Does anyone have any clues for me?

SublimeGit port?

Not sure if this is of any help but looks like it could be of some assistance. https://github.com/nodegit/nodegit


I was hoping to exploit the Git support built into Atom as much as possible without introducing another dependency. But perhaps the nodegit library might get me going for now.

Thank you for the suggestion :smile:


Perhaps you want to look at the Git class from the Atom API: https://atom.io/docs/api/v0.71.0/api/classes/Git.html

I’m not quite sure what you have in mind, but the Fuzzy Finder package already allows you to search through modified files (Find > Find Modified File/⇧⌘B) for the current project.


Hey @lukesutton, sounds like a cool package idea!

git-utils only exposes a bit of libgit2’s functionality. It looks like it doesn’t expose any of the status functions, so you would need to open a PR to add that functionality.


@ProbablyCorey I will start looking into that then. I have zero C++ skills however, so we’ll see how it goes!


im try to use git push with https://github.com/nodegit/nodegit, but seems it’s async call doesn’t work with atom.

I only managed to get git clone work and else doesn’t need callback. so im trying to make all methods in nodegit sync


I’m also working on a git package!

I’m using the gift node package to talk to git. It returns a very useful status hash. Gift is probably what you’re looking for.

EDIT: I didn’t see how old this was when I posted. Gift is still probably useful to someone, but probably not you anymore :slight_smile:

(You can see what I’m up to here)


What I’d been working on was really a proof of concept. I didn’t get too far TBH. I’ve had a quick look at atomagit and it’s looking good!