31 March 2010

Git Aliases

"With aliases, you can avoid typing the same commands over and over again." - from the Aliases page on the Git SCM Wiki

Once I found this, I immediately created the following aliases in ~/.gitconfig, as I frequently used these with Subversion.

ci = commit
st = status

I'm also fond of the llog alias mentioned on the wiki that displays the log with dates in your local timezone.

llog = log --date=local

Additionally, I added an alias that diffs my local repository (committed changes) with our remote Subversion repository, showing changes that aren't committed to Subversion.

sdiff = diff --name-status remotes/git-svn

24 March 2010

A case for git-svn (Git + Subversion)

Why git-svn?

1. Our central repository is Subversion and that's not changing. Otherwise, I'd be using Git without Subversion.
2. I wanted to have a way to do local commits that aren't quite ready for the central repository. This gives me a way to track my small changes by setting checkpoints (local commits) without breaking the build on our CI server.
3. The majority of ThoughtWorkers say Git is Best in Class.
4. Joel Spolsky is sold on Distributed Version Control:
This is too important to miss out on. This is possibly the biggest advance in software development technology in the ten years I’ve been writing articles here.

Or, to put it another way, I’d go back to C++ before I gave up on Mercurial.

5. Even without an internet connection, I can work and commit locally as well as view the entire Subversion log.

If you're stuck using Subversion as a central repository, you should check out git-svn.

Further reading:
git-svn - Bidirectional operation between a Subversion repository and git

git svn status - showing changes that are not committed to svn

17 March 2010

Subversion global-ignores

To force your svn client to ignore files and folders from Subversion without using the svn:ignore property, edit ~/.subversion/config. This file should already have a commented-out line similar to the following:

# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo

Why use the global-ignores rather than the svn:ignore property? I wanted my svn client to ignore my .git directory, but didn't want to modify the svn:ignore property in the repository. No one else cares about the directory I'm ignoring (.git) - they don't even have that directory.

Here's my new global-ignores line:

global-ignores = .git *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo

In my next post, I'll explain how and why I'm using both Git and Subversion.

15 March 2010

Rework

I'm excited to read Rework - the excerpts I read were excellent! You can read more about the book at Signal vs. Noise, an outstanding blog by 37signals.

10 March 2010

Martin Fowler: VcsSurvey

Interesting survey results from ThoughtWorkers on version control:

VcsSurvey

To summarize, ThoughtWorkers strongly prefer Subversion, git, and Mercurial over the other options.

09 March 2010

Irrational

"We are irrational. Proof: We believe we are rational."

From Bruce Eckel's recent post entitled A Golf Ball to the Forehead.

07 March 2010

Running an effective meeting

Prepare before the meeting starts. More than 10 minutes.

State the purpose of the meeting at the beginning of the meeting. Without a stated purpose, meetings tend to be directionless, long-running, and leave people feeling like they wasted their time.

Get expectations from everyone at the beginning of the meeting. This gives everyone the ability to participate and ensures that they know why they're there.

When people start rambling or dominating the meeting, ask questions, restating what you think they're saying. Often when a rambler or dominant player sees that they've been heard and understood, they stop talking.

Be aware of time and wrap up when appropriate. Wrapping up should happen either (a) when the goal of the meeting has been accomplished or (b) just before time runs out - whichever comes first. An effective meeting can and should end early if its goal has been accomplished.

Encourage everyone to share benefits & concerns at the end of every meeting so the next meeting can be better.

Thanks to Sogeti and Lorel Au for offering a class on meeting management where I learned all of this.