Example using git bisect to narrow in on a commit
I learned about
git bisect
from this Stack Overflow poll:
What are your favorite git features or tricks?
I thought it was so cool that I wanted to share an example.
After upgrading from Django 1.2.3 to Django 1.3, something broke on the website
I was working on. To figure out what was wrong, I used git bisect
to find the Django revision that introduced the relevant change. I cloned the
Django github repo and
pip install -e'd it into my virtualenv. Then
I used git bisect as follows:
- Start git bisect
$ git bisect start$ git ...
git notes
How to get the tag associated with a specific git revision
$ git describe --tags 5c70d1a15a4637a2057b1464c54820629e78cd05
staging/1.5
How to show the tracked branches from the remote "origin"
$ git remote show origin
How to find renames¶
$ git log --name-only --follow --all -- filename
How to remove all local tags¶
$ git tag -l | xargs git tag -d
How to detach a subdirectory into separate Git repository¶
Note I did not want any tags or branches in the new repository. From http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository/359759#359759
$ git clone --no-hardlinks /XYZ /ABC ...Colorized, interactive "git blame" in Emacs: vc-annotate
A few months ago, I learned that
vc-annotate
displays a nicely colorized
git blame in Emacs.
Today I learned that it is also interactive. I can cycle through revisions
using p and n, open the file at a specified revision
with f, view the log with l, and show a diff
with d or changeset diff with D. (Unfortunately,
the diff is ugly and not in color.)
vc-annotate is included with Emacs. To use, open a version controlled file, and type C-x v g or
M-x vc-annotate
I am using Emacs 23.1 on Ubuntu Maverick
... read more »Versioning /etc with etckeeper and git
Update 2011-08-13: I switched to a custom apt-get wrapper so that I can keep a versioned list of installed packages and generally because I have NIH. (I had no problems with etckeeper). My apt-get wrapper is on here on github
-
$ sudo apt-get install etckeeper - Edit
/etc/etckeeper/etckeeper.conf. Change VCS from "bzr" to "git" - Initialize etckeeper and git repo
$ cd /etc $ sudo etckeeper init $ sudo git status $ sudo git commit -m 'Initial commit'
- Done.
My software tools list
Inspired by Mark Pilgrim's 2006 Essentials list, below is a list of my current software tools. If you notice a lot of "I switched from ..." statements, keep in mind that I am a programmer who likes shiny things.
Other lists¶
- Mark Pilgrim's Essentials, 2008 edition
- Adam Gomaa's Essentials (2008)
- Here is a 2010 update for Mark Pilgrim. After 2 and a half years, I still have several items in common: Ubuntu running rxvt-unicode and Emacs 23, the Unicomp keyboard, an Android phone, Gmail, Google Reader, Google Docs, and Pandora.
- Salvatore Sanfilippo on usesthis.com (2011)
- Aaron Boodman ...
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(6)
-
aws
(10)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(14)
-
datetime
(4)
-
decorators
(4)
-
django
(40)
-
emacs
(22)
-
files_directories
(12)
-
git
(5)
-
hardware
(5)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(6)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(6)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(146)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(10)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(65)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(6)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan