Commit f565c05d authored by scollis's avatar scollis
Browse files

ADD: instructions

parent 89816bef
=============================================
How to interact with group level repositories
=============================================
Coming soon
==================================================================
Instructions on how to work on a repository in your own user space
==================================================================
These instructions pertain to working on a repository you have created in your
own user account.. For example collis/a-cool-repo. NOT for working with a
repository in a group area, for example this repository which is in share.
Getting started
===============
First you need to create a new repository. Go to https://code.arm.gov/dashboard/projects.
Pick a descriptive *but not too long* project name. No spaces, no special
characters, you have to be happy to type this many times. Keep permissions to
internal, not private or public.
You also need to have your SSH keys set up so you can transfer to your local
machine using SSH protocol (no https!). Setting this up is under your settings.
Click on your avatar (which defaults to a pattern-ish thing) upper right hand
corner. Click "settings". The task bar just under the "Fox" GitLab logo will
then have a "SSH Keys" option.
There is an instruction on generating a key on the page. If you have already
generated a key copy paste from ~/.ssh/id_rsa.pub **note: On some systems you
may want to open in an editor and copy paste instead of doing "more id_rsa.pub"
in the terminal as this can add carriage returns**.
Now you are ready to clone your repo for the initial commit. Go back to the repo
page (https://code.arm.gov/USERNAME/REPONAME) and just under the title there is
a text box with "SSH" next to it and a git@code.arm.gov:USERNAME/REPONAME link.
Copy that and go to your local shell, go to where you want your repo to reside
and type "git clone" and paste in the location. You will get some warnings that
your repo is empty..
Change directory into the repo directory. **Warning: GitLab, unlike GitHub does
not create master for you**. You need to create the master branch. Type:
git checkout -b master
touch README.rst
-Edit README.rst with your favourite editor-
git add README.rst
git commit -m"INIT: Initial commit creating master"
git push origin master
*This will be the first and only time you work directly on master.* In the
Argonne group we use branches.
Doing work with branches on code.arm.gov
========================================
Branches are great. They enforce discipline, avoid conflicts and keep master
clean. here are the steps to "adding a feature":
One: create the branch from master
----------------------------------
Make sure you are on master
.. code-block:: shell
git checkout master
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment