One thing Windows does better than Ubuntu on my Alienware M17x is allow
me to use the low power mode on the laptop, which is perfect when
Once I had set up a simple development environment on my
Windows partition, I needed a way to be able to work on my Coldfusion
code, but not lose any of my source control history. This is where the
power of Git became so very useful.
each Git local repository is a full Git repository in it's own right,
and any Git repository can pull from any Git repository, I did the
While in Ubuntu, plugged in my USB key stick
- Opened up a terminal at my usb stick
- Cloned my local git repository to the USB Stick
git clone /home/mark/wwwroot/coldspring ./
- Rebooted into Windows
- Opened a Cygwin terminal (Yeah, I use Cygwin in Windows, as I hate the Windows terminal)
- Cloned the repository on my USB stick to my C: drive
git clone /cygdrive/g/coldspring ./
probably could have made this pathway shorter, but I wanted a way to
backup to an external device in case something went horribly wrong with
the RAID1 hard drives in my laptop. However, I now had a copy of my Git
repository in my Windows partition, ready to use, with my full
repository commit history.
Once I had got off the plane, and got
back to doing work on my Ubuntu partition again, I needed to move the
commits in the repository in my Windows partition back to my Ubuntu
This is now very easy, again, due to the distributed
nature of Git, and the fact that any repository can pull from any
repository. To return all my commit history to my Ubuntu partition,
where I do my main development, I did the following:
- Log into my Windows partition
- Go to the repository on my flash drive, and pull from the Git repository on my windows hard drive.
git pull /cygdrive/c/wwwroot/coldspring
- Boot back into my Ubuntu partition
- Open a terminal in my source folder for Coldspring 2, and pull from the Git repository on my Flash Drive (/media/corsair).
git pull /media/corsair
- Voila – my commit history is intact, and all the changes I made on my Windows partition are on my Ubuntu partition.
That's just how amazingly flexible Git is. Try and do that on SVN with no Internet connection ;o)