---
layout: default
navsection: userguide
title: Working with an Arvados git repository
...
{% comment %}
Copyright (C) The Arvados Authors. All rights reserved.
SPDX-License-Identifier: CC-BY-SA-3.0
{% endcomment %}
This tutorial describes how to work with an Arvados-managed git repository. Working with an Arvados git repository is very similar to working with other public git repositories.
{% include 'tutorial_expectations' %}
{% include 'tutorial_git_repo_expectations' %}
h2. Cloning a git repository
Before you start using Git, you should do some basic configuration (you only need to do this the first time):
~$ git config --global user.name "Your Name"
~$ git config --global user.email $USER@example.com
https://git.{{ site.arvados_api_host }}/$USER/tutorial.git
git@git.{{ site.arvados_api_host }}:$USER/tutorial.git
~$ cd $HOME # (or wherever you want to install)
~$ git clone https://git.{{ site.arvados_api_host }}/$USER/tutorial.git
Cloning into 'tutorial'...
~$ git config 'credential.https://git.{{ site.arvados_api_host }}/.username' none
~$ git config 'credential.https://git.{{ site.arvados_api_host }}/.helper' '!cred(){ cat >/dev/null; if [ "$1" = get ]; then echo password=$ARVADOS_API_TOKEN; fi; };cred'
~$ cd tutorial
~/tutorial$ git checkout -b tutorial_branch
~/tutorials$ nano hello.cwl
~/tutorial$ git add hello.cwl
Next, commit your changes. All staged changes are recorded into the local git repository:
~/tutorial$ git commit -m "my first script"
~/tutorial/crunch_scripts$ git push origin tutorial_branch