Installing and setting up GIT

Installing GIT on Mac OSX

  1. Download and install the package
  2. Run the script on that disk image called "setup git PATH for non-terminal programs.sh"
  3. Log out and and log back in (or reboot or whatever)
  4. if you need a github account, sign up for one on https://github.com/
    --- you need an ssh public key for your computer, and add it to your github account in order to push commits
  5. To generate a key, in the terminal, type : ssh-keygen
    -> press enter a bunch of times to accept all of the defaults
  6. Still in the terminal, type : sudo cat ~/.ssh/id_rsa.pub | pbcopy - this will copy the previously generated key to clipboard
    When you are asked for your password, it is asking for the password you use to login to your computer.
  7. Go to your Account Settings on github.com and click on: SSH Public Keys, then Add another public key
  8. Choose a title for your key and past the key previously copied to clipboard in the field named Key and press Add Key - you're done
  9. Eventually go to the preferences part below

To Check out Jamoma from GIT : Go there.

You can also set your git preferences as described below

Installing GIT on Windows (using cygwin)

Get Git
  1. Download the cygwin setup runtime http://www.cygwin.com/setup.exe
  2. Run it to install cygwin (choose the default option until the 'select package' menu)
  3. When you're in the package menu :
    - choose all relative git packages (in devel : git-completion, git-gui and gitk)
    - then the openssh package (in net).
  4. Open the cygwin window.

Configure the ssh key
  1. In the ~ folder : ssh-keygen -C "me@some.where" -t rsa (This will generate your ssh keys into the ~/.ssh folder. If you check into you'll see an id_rsa and id_rsa.pub files)
  2. Copy the ssh key into the clipboard : cat .ssh/id_rsa.pub | putclip
  3. Go to https://github.com/.
  4. In your account part (if you've already signed up), copy the public key (just do ctl+V into the field, this will paste the clipboard). This should look like this : ssh-rsa AAAAB3NzaC1yc ...a lot of things... xX88+2JViQ==

Alternative

If you choose the MSysGit install then it will ask you a bunch of questions when installing. It is extremely important to get the line-endings option correct. You should choose the 3rd option (leave the line endings as they are) despite the fact that it tries to scare you away from this option. If you fail to get this correct you will have an extremely hard time using Git to work on Jamoma.

To Check out Jamoma from GIT : Go there.

Preferences

You can have a preferences file for Git. This is placed in your home folder and called '.gitconfig'. It could like something like this:

[user]
    name = Joe Blow
    email = joe@blow.com
[core]
    editor = mate -w
    excludesfile = /Users/tim/.gitignore
[github]
    user = joe
    token = ffe6534674500683267422160ecf0851813e
[color]
    ui = auto
[alias]
    stat = status
    co = checkout
    ci = commit
    b = branch
    s = status
    mt = mergetool
    mylog = log --stat
    slog = log --pretty=oneline --abbrev-commit
    all = submodule foreach git

Some setting are personal -- for example, the [github] section. The [core] section contains an editor for editing commit logs when not using the -m option (I like TextMate for this, as below). The [alias] section is for making your own shortcuts for various git commands.

You can edit this (invisible) file in Max's text object, by sending the (read /Users/YourUserName/.gitconfig, open)to the text object.

Note: this file might not exist after fresh GIT installation. You can create it and also edit its entries using git-config command in the terminal, for example:

$ git config --global user.name "your_github_username" - will set name entry in the [user] section. It will also automatically create ~/.gitconfig file if it doesn't exist yet.

For more commands type: man git-config in the terminal.