Dieser Blog ist tot. Ich blogge weiter auf dem «Agile Trail».
Getting JUnit from Git on a Mac
I want to dig deeper into JUnit for some reasons. Therefore I want to see the latest version in the repository. JUnit uses Git. I use a Mac and never used Git before. Here's what I've done to get JUnit from Git on a Mac.
I installed Git for OS X. It's a dmg file and quite simple to install.
After that I had to add Git's bin path to PATH to use Git in the terminal. I added this to
~/.bash_profile
.export GIT_HOME=/usr/local/gitWorked now for me: I entered
export PATH=$PATH:$GIT_HOME/bin
git
in the terminal and saw a list of commands.Now what? I read parts of the official Git tutorial online and in the terminal with
git help tutorial
. I entered my user.name
and my email.adress
as a key with git config --global key value
where value
is my name or email adress, because I should do that "before doing any operation".I continued reading at paragraph "Using git for collaboration". There's what I was looking for:
Suppose that Alice [aka Kent] has started a new project with a git repository in /home/alice/project [aka git://github.com/KentBeck/junit.git as listed on github.com], and that Bob [aka me], who has a home directory on the same machine [aka ~/projects/junit], wants to contribute.In the terminal I entered
git clone git://github.com/KentBeck/junit.git ~/projects/junitNow Git downloaded JUnit. Finally JUnit was downloaded on my computer. The tutorial states that if Kent would commit changes I could be again up to date with a simple
git pull
.So far so good to be able to have a look around in JUnit.
[Update: If you want to run Git within TextMate, than you can. TextMate can deal with Git from the start, but you have to set
TM_GIT
as a shell variable, e.g. to /usr/local/git/bin/git
or wherever you've installed Git.]