Git Ready and the ZSH Prompt

Posted by matt
on Friday, January 30

Git is one of those programs, like, say vim, which contains more functionality than it seems humanly possible to grasp. Thankfully, there are sites like gitready, which are designed to help us mere mortals to grasp the awesomeness.

I’m very pleased to be able to report that a bit of awesomeness that I’ve been involved in has been listed. Have a look at the ZSH Git Status page and you might see what I mean. That’s right: zshkit is mentioned.

If you’ve not read any of my other posts on it, zshkit is a project, started by Bryce “BonzoESC” Kerley, and forked by various people (I think I just had the honour of being the furthest up the network graph).

Over the next few days, I’m hoping to implement the vcs_info stuff mentioned in the git-ready comments.

Git: failed to push some refs

Posted by matt
on Tuesday, August 05

I’m keeping my PhD thesis in a private repository on GitHub, because you can never have enough copies.

A couple of times when I’ve tried to push, after some fairly major rejigging, I’ve had the error:

To git@github.com:mattfoster/thesis.git ! [rejected] master -> master (non-fast forward) error: failed to push some refs to ‘git@github.com:mattfoster/thesis.git’

Which is obviously quite annoying. Ed’s Elite blog suggests that when this happens you should run git pull, manually merge, and then try the push again. ARGH!

A quick google suggested that just using git push --force might be easier, and sure enough it is.

I’ve no idea if this might have repercussions later on, but I’ve no reason to expect it will.

So, as a quick repeat, in case you’re skimming:

If you see: failed to push some refs, do git push --force

Update: you might find that this breaks some of your history, which could be a problem, especially if you’ve got people who forked before you did this. Just a quick warning!