We’re using git for most django projects now. There’s one big problem I had: if I make a branch and want to push my changes to github, I sometimes get an error complaining that I’m behind on other branches so that my changes can’t be pushed.
The “solution” is to do a git checkout master
, pull there (which updates
my master pointer), and checkout back to my branch. Now I can push.
This is pretty irritating. Why can’t I just push the branch I’m working on? I found the solution on stackoverflow:
git config --global push.default current
This pushes only the current branch by default. Just what I wanted.
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):