C. Command-Line Reference : ls-repo
   
ls-repo
display GitCentric configuration
Usage
gitcentric ls-repo [--all] [--help] [<reponame>...] [--]
Description
The gitcentric ls-repo command lists GitCentric configuration information.
Specify one or more repositories to display with arguments <repo_1> through <repo_n>.
Note that only repos that are eligible to be mapped to AccuRev are listed, so a "parent-only" repo is not displayed, even if its children are. Use the ssh gerrit ls-projects --type ALL command to list all repos.
Options
--all
Display all repositories that are accessible by the calling user. (Specifying --all is the same as specifying no options at all.)
--help, -h
Display the help for this command.
--
"End-of-options" marker. See Basic Syntax on page 89 for more details.
Examples
 
> ssh -p 29418 mylogin@myserver gitcentric ls-repo -all
Access
Any registered user. You will only see repositories to which you have at least Read access.
See Also
Basic Syntax on page 89, config-branch, config-repo
CLI Example
This example walks you through the entire process of creating a repository, cloning it, populating it with content, pushing, and finally mapping one of its branches to an AccuRev stream, all through Git, Gerrit, and GitCentric CLI commands.
1. Create a repository with an initial empty commit:
ssh -p 29418 yourUsername@yourServer gerrit create-project --empty-commit repoName
2. Register the repo with GitCentric and associate it with an AccuRev server:
ssh -p 29418 yourUsername@yourServer gitcentric config-repo repoName
-S 10.0.0.182:5050 -u syncUser -p syncUserPassword
3. Clone the repo.
git clone ssh://yourUsername@yourServer:29418/repoName repoName
4. Change to the new clone’s directory and configure it:
cd repo_tues2
git config user.name "Firstname Lastname"
git config user.email "f.lastname@yourdomain.com"
git config remote.origin.push refs/heads/*:refs/for/*
5. Using your preferred text editor, create a file in the clone.
6. Add, commit, and push the file:
git add --all
git commit --all -m"First commit"
git push
Note: This step creates branch "master", which must exist before the next step.
7. Map the "master" branch to a stream named "agc_devel" on the AccuRev server:
ssh -p 29418 yourUsername@yourServer gitcentric config-branch repoName
-b master -s streamName -e /
8. Display a listing showing the mapped repo:
ssh -p 29418 yourUsername@yourServer gitcentric ls-repo