Posts in “Git”
A guest blog post I wrote on managing git branches when doing devops.
When doing Devops we all know that using source code control is a “good
thing” — indeed it would be hard to imagine doing Devops without it. But
if you’re using Puppet and
R10K
for your configuration management you can end up having hundreds of
old branches lying around — branches like XYZ-123,
XYZ-123.fixed, XYZ-123.fixed.old and so on.
Git bisect is a great tool for finding bugs in a program. But many examples show manual uses of git bisect - here’s an example of automating the process using git bisect run.
(Just a summary of Stack Overflow “How do you Remove an Invalid Remote Branch Reference from Git?”).
Git has a “force push” option (git push -f remote branch), but it doesn’t have a “force pull” option (like git pull -f remote branch).
Some doco for my work mates, and others learners of git…
My new favourite git option:
My new favourite git option:
A script to make an existing git branch track a remote branch. For example when you’ve cloned from somewhere else and now want to track your normal remote.
If you work in an IT environment, it’s nice to be able to quickly share some of your git repositories from your workstation, without setting up accounts and ssh keys ie using http.
For development projects, I use the standard git workflow ie master is my main branch, and I do development in branches (read more about this recommended workflow at [A successful Git branching model][1]**).
When I’m working with git, I like being able to see a list of files that have changed (new, modified, deleted, etc) in the commit message. So when I do a git log, rather than getting this:
I’m busy learning [LISP][1]/[Scheme][2] at the moment (in order to later move on to [Clojure][3]).
A nice git option I stumbled upon today – [amend][1].
When doing a git clone from a repo hosted on a Mac OSX machine (installed using macports), I get this error on the client (Linux, cygwin, whatever):
A couple of scripts I (very) quickly wrote for managing git branches, so I don’t have to keep reading[ git cheat][1].
Up until a few weeks ago I was using subversion for all my personal stuff.