Difference between revisions of "TubeTK/Development/GITConfiguration"

From KitwarePublic
Jump to navigationJump to search
Line 48: Line 48:


  $ git config --global core.pager "less -FXRS"
  $ git config --global core.pager "less -FXRS"
[[Category:TubeTK]]

Revision as of 15:30, 22 July 2013

Install git

Linux (Ubuntu)

sudo apt-get install git-core

You may also want to install gitk and git gui

sudo apt-get install gitk
sudo apt-get install git-gui

Windows

  • These instructions are a useful guide to using git on Windows.
  • Install msysgit
    • During the installation, make sure you add Windows Explorer integration, selecting both "Add Git Bash Here" and "Add Git GUI Here"
  • Once you've installed msysgit, you can right-click on any folder to open Git GUI (graphical user interface to git) or Git Bash (console interface to git)
  • Selecting "git bash" allows you to enter the git commands listed in these wiki pages
  • TubeTK also requires svn (subversion): on Windows, you can try Collabnet Subversion Edge (the command-line client is sufficient)

Local Configuration

Semi-automated Method

On Linux, we provide a script to confirm your git environment:

 cd foo/tubetk/Utilities
 ./SetupForDevelopment.sh

Alternatively, you can use a manual setup method...

Manual Method

These steps are a one-time setup per-user per-machine.

The --global option stores the configuration settings in ~/.gitconfig in your home directory so that they apply to all repositories.

We require all commits in TubeTK to record valid author/committer name and email information. Use git config to introduce yourself to Git:

$ git config --global user.name "Your Name"
$ git config --global user.email "you@yourdomain.com"

Note that "Your Name" is your real name (e.g. "John Doe", not "jdoe"). While you're at it, optionally enable color output from Git commands:

$ git config --global color.ui auto

If less displays strange characters and no color, your LESS environment variable may already be set. You can override the less options with:

$ git config --global core.pager "less -FXRS"