I’m a cross-platform developer, with about 17 different development environments. Most projects have a remote central team repository. git lets me cast my code out to all my local locations and effortlessly remained synced with the team repo. In addition, I can work exclusively in my local repos, as long as I need to, without touching the team repo until I’m ready to push my stuff to it. I’ve refined my process down to just the right number of branches to accomplish this. Here’s my git bliss:

First, set up a local centralized repo:

ssh me@my-central-repo-server
git clone ssh://me@the-team-repo/big-project
cd big-project
git branch daily_grind # create working branch but do NOT check it out

Next, set up a [git merge-to] command (huge THANKS to this gist):

emacs .git/config
  [alias]
    merge-to = "!gitmergeto() { export tmp_branch=`git branch | grep '* ' | tr -d '* '` && git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset tmp_branch; }; gitmergeto"

Now we can set up a clone in many new locations – repeat this on each dev box:

ssh me@my-laptop
git clone ssh://me@my-central-repo-server/big-project
cd big-project
git checkout -b daily_grind origin/daily_grind

This location is now a work site. Work in the daily_grind branch. Always pull before you get started working, and push when done:

ssh me@my-laptop
git pull
# work work work!
git commit -a
git push

When you are ready to share with the team, all your commits from all your dev locations will be in your central repo, in the daily_grind branch. Just merge your work with the team’s:

ssh me@my-central-repo-server
git pull # to get the team's latest
git merge daily_grind # to merge in your latest
# resolve any conflicts
git push # to push your changes to the team
git merge-to daily_grind # to push team changes to your work repo

If there were any team changes, you’ll get them in your local repos the next time you pull.

And away we go.

here are all the confusing mostly-incomplete zip file solutions:

  • zlib THE lib; only does ONE file, knows nothing about .zip containers; gz uses zlib, works on ONE file (the tar file, hence .tar.gz)
  • miniz some google code HACKERY that does exactly what i want (.zip handling in one header file) but DOES NOT WORK – erp, yes it does, id10t
  • minizip a zlib-bundled addon package that allows for working with .zip files
  • boost you can bake zlib into boost but again, it knows nothing about .zip files, MOTHER FRACK
  • libzip ANOTHER library, supposedly handles .zip files – REQUIRES ZLIB DOH, might as well use minizip

In the end, miniz made it pretty easy (once I used it correctly). Remember, a .zip file is a container of compressed files, doh.

That was fun! :-)

I always seem to forget how to fade the edge of an image in the gimp… so here’s a note-to-self:

      select the area to preserve; IF YOU WANT THE EDGE TO FADEOUT, SELECT A BOX JUST INSIDE THE ENTIRE IMAGE; YOU CAN ALSO USE THE MAGIC WAND TO SELECT AN AREA, AND SHRINK AND GROW AS NEEDED
      SELECT->FEATHER, GIVE IT ABOUT 5 PIXELS; THIS APPEARS TO DO NOTHING BUT PUT A BIT OF ROUNDED CORNERS ON YOUR SELECTION, WEIRD EH?
      NOW, INVERT THE SELECTION, AND HIT DELETE – vioala, GIMP FADES OUTWARD. YEs, IT’s weird!

soRRY ABOUT THE caps, IT’S HONESTLY EXACTLY how the letters are spewing out on my macbOok prO, Now That i”ve Mananged to get it humming and then spill a full glass of water on it. AWESOmENEsS. AND that”s With another Keyboard attacheD. aPPARENTLY THE MAIN KEyboard is flicking THe shift KEy on aND OFF LIKE A CHRISTmAS TrEE. AND IT’S not EVen ThaNKSGIving Yet.

This problem turned out to be due to the very long relative paths that Visual Studio created to the gsoap-generated files. (continued…)

I just updated my Macbook Pro, removing the Super Drive and adding an SSD, following this awesome, concise and precise video.

It was as good a time as any to refresh everything.

Here’s the result:

CHOOSE!

These are a few of my favorite things…

Here are my highlights (cautionary tales, really) from the experience. I’m not taking the time to do a full writeup, since it was a specific upgrade, not a clean install, but add a comment if you have a specific question for me. (continued…)