Download ROSE Developer`s Guide: - ROSE compiler infrastructure

Transcript
1.2. WORKING WITH THE ROSE GIT REPOSITORIES
7
and each developer can create any number of branches that he owns. No developer can modify a branch owned
by another developer, but a group branch can be created that can be modified by groups of users.
Branches in the ROSE repository is named according to naming convention so that it is easy to see who owns
a branch and if the developer intends this branch to be tested, released or not tested at all. This is done with a
prefix and postfix scheme.
The prefix of a branch name maps directly to your LLNL official user name (OUN). For example, a developer
’John Brady’ has the OUN ’brady1’. If he is working on a bugfix for bug number 1234 he should create a branch
’brady1-bug1234’ where he works on this.
If work on a branch has reached a stage where a developer deems it ready for integration, he should push his
changes to a new branch with a ’-rc’ postfix. RC stands for ’Release Candidate’ as this work will be integrated
with master if it passes all the tests.
1.2.5
Making a Copy of the Internal repository
Before starting to work a developer must create a local clone of the central git repository. Please configure this
copy with your name and email before starting work.
• Configuration:
– Set your name: git config –global user.name ’John Doe’
– Set your email: git config –global user.email [email protected]
– Tell git-branch and git-checkout to setup new branches so that git-pull(1) will appropriately merge
from that remote branch: git config branch.autosetupmerge true
• Get content in the repository:
– Clone
a
private
repository
from
the
shared
repository:
git
clone
file:///nfs/casc/overture/ROSE/git/ROSE.git localRoseName .
A directory named localRoseName will show up after this command. Type cd localRoseName to operate within the private
repository from now on.
– Retrieve EDG source files: we use a separated git repository for EDG to protect its proprietary source
files. The EDG git repository is linked to the ROSE git repository as a submodule. You have to
explicitly get the submodule if you want to modify the EDG source files. Just type:
git submodule init; git submodule update
– list all branches in the central git repository: git branch -r
– list all branches in the local copy of the git repository: git branch -l
– list all local and central branches: git branch -a
– show the log: git log
• Using a branch:
– creating a local branch within a local repo, based on whatever current branch’s content: git branch
branch-name
– creating a local branch to track a central branch: git branch branch-name –track origin/branch-name