article

Life With Git

Update to my evolving list of notes on using git in day to day development. In some cases these are just the best methods I've found thus far, comments and suggestions are welcome. Sorry for the raw format. :) Phasing use of cogito out for raw git usage, most of it is now gone.

Getting Set Up

Edit ~/.ssh/config:

Host git.dangerouslyinc.com
User herk
Port 2223

Checking out:
git clone git+ssh://git.dangerouslyinc.com/git/wuja

Identify yourself:
git repo-config user.name "Awesome Haxor"
git repo-config user.email "ahaxor@dangerouslyinc.com"

Update:
git pull

Commit locally:
git-commit -a

Workflow

  • Work in branches.
  • Git pull in master to keep up to date.
  • Rebase branch against master.
  • Merge branch into master if pushing. (i.e. with commit access)
  • Format patch in branch if not pushing, wait for changes to appear in master via a pull.

Branching

List:
git branch

Create 'new' branch:
git branch new

Switch to branch:
git-checkout new

Publish local branch:
git push git+ssh://git.dangerouslyinc.com/git/revelation splashid:splashid

Checkout branch elsewhere:
git pull git+ssh://git.dangerouslyinc.com/git/revelation splashid:splashid

Merge master into branch:
git-merge master

Generating Patches

git-format-patch origin

Reverting Uncommitted Changes

git-checkout file-to-revert
git reset HEAD <file>

Diff

Generate diff between two commit IDs:
cg diff -r 0fa7b047ad8968f5996029071e04cb9b4f2831b9..234cde4eb65cc903e40a98f4d87eea9ae28f7ef4

Diff most recent commit:
git diff HEAD^ HEAD

Tags

Create and push a tag:
cg tag 0.0.5
git push --tags

Repositories

Tracking svn:
git-svn init svn://url
git-svn fetch
git-clone rhn.git newrepodir
git-svn dcommit

Creating a new remote repository:
# Upload .git dir
git --bare update-server-info
chmod +x hooks/post-update

Misc

Create a tarball for release:
git archive --format=tar --prefix=wuja-0.0.8/ HEAD | gzip >~/rpmbuild/SOURCES/wuja-0.0.8.tar.gz

Clone to send to someone:
git clone --bare my-project

Open Source Cryptography

For those of us who spend heinous amounts of time online, cryptography and it's applications are both interesting and increasingly relevant. Stopping to consider the information we transmit and receive over the course of a day and then analyzing the potential ways that information could be exploited can be a little scary. The following are some freely available open source tools that can be used daily to protect your privacy and reduce some of the risks for information abuse.

Fedora 7 Test 2

I've been playing with Fedora 7 Test 2 this weekend on both desktop and laptop, I believe it's still a couple months away from official release so not surprisingly a few packages aren't working particularly great just yet. Regardless it's stable enough to be usable and offers a good chance to tinker with the new functionality.

My Hardware

  1. Desktop: AMD64 3200+, Asus K8V SE Deluxe motherboard, Nvidia graphics card, 2 GB RAM
  2. Laptop: Dell Inspiron 640m, Intel Core 2 Duo 1.6ghz, 1 GB RAM, Intel PRO/Wireless 3945ABG, 14.1" WXGA+ 1440×990 widescreen display

A Debian Etch RC1 Review

As alluded to in my previous post, I've decided to give Debian Etch RC1 a test run on my machine after a couple years with Ubuntu and now Fedora. My reasons for doing so are discussed at length in that previous post, but basically I kind of miss running a .deb based distribution, and I'm curious how a more current Debian system stacks up against the user friendly and wildly popular distributions of the day.

The Z Shell And Why You Should Be Using It

I've only recently come to appreciate the glory that is zsh, a command line shell with an arsenal of features large enough to keep you learning for the rest of your natural lifetime. I made the switch from bash (seems to be the most common default shell on Linux) a few years ago after reading somewhere of zsh's vast benefits. I spent a couple days learning the ropes, assembling a basic .zshrc and memorizing a few tricks, then moved on to using those daily and forgot about it.

My Mutt Setup

For a good five years I was a loyal user of the text based Mutt e-mail client, which may sound archaic, but actually turns out to be a pretty amazingly powerful program and great for your productivity.

Syndicate content