Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 2.02 KB

VC-|-Initial-Git-Setup.md

File metadata and controls

35 lines (26 loc) · 2.02 KB

Before getting started using git with Trilinos (or any other project that uses git), one should perform a basic setup of git (see How to Do Version Control with Git in Your CSE Project, an IDEAS Productivity "How To" Document):

1) Set up minimal Git settings for your account, including “user.name,” “user.email,” “color.ui,” “push.default,” and “rerere.enabled”:

git config --global user.name "First M. Last"
git config --global user.email "[email protected]"
git config --global color.ui true          # Use color in git output to terminal
git config --global push.default tracking  # or 'simple' with git 2.0+
git config --global rerere.enabled 1       # auto resolve of same conflicts on rebase!

For example, set up a shell script like git-config-bartlettra.sh and run it on every new machine to set consistent git settings. The first two settings are required. The last three are recommended.

2) Install Git helper scripts locally for the Git shell prompt git-prompt.sh and Git tab completion git-completion.bash, and add them to your shell, for example, setting the following in your ~/.bash_profile file:

source ~/git-prompt.sh
source ~/git-completion.bash
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '

These scripts make using git easier, but are not required.

3) Clone Trilinos and get on 'develop' branch:

git clone [email protected]/trilinos/Trilinos.git
cd Trilinos/
git checkout --track origin/develop
git branch -d master

(see develop/master workflow)