X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/406b3de5426bf0d63564410cf6caf2834ba2b7bb..7b6a085a92e78787a15a34ad8e536444ad230552:/doc/user/tutorials/git-arvados-guide.html.textile.liquid diff --git a/doc/user/tutorials/git-arvados-guide.html.textile.liquid b/doc/user/tutorials/git-arvados-guide.html.textile.liquid index cabe43deb4..ad719a66e4 100644 --- a/doc/user/tutorials/git-arvados-guide.html.textile.liquid +++ b/doc/user/tutorials/git-arvados-guide.html.textile.liquid @@ -3,21 +3,19 @@ layout: default navsection: userguide title: Working with an Arvados git repository ... +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. -This tutorial describes how to work with a new Arvados git repository. Working with an Arvados git repository is analogous to working with other public git repositories. It will show you how to upload custom scripts to a remote Arvados repository, so you can use it in Arvados pipelines. +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' %} -{% include 'notebox_begin' %} -For more information about using Git, try - -
$ man gittutorial
-
or *"search Google for Git tutorials":http://google.com/#q=git+tutorial*. -{% include 'notebox_end' %} - -h2. Cloning an Arvados repository +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): @@ -50,40 +48,40 @@ Ignore any warning that you are cloning an empty repository. h2. Creating a git branch in an Arvados repository +Create a git branch named *tutorial_branch* in the *tutorial* Arvados git repository. +
~$ cd tutorial
-~$ git checkout -b tutorial_branch
+~/tutorial$ git checkout -b tutorial_branch
 
-h2. Adding files or scripts to an Arvados repository +h2. Adding scripts to an Arvados repository -Create a file named *tutorial.txt* in the local repository. +A git repository is a good place to store the CWL workflows that you run on Arvados. - -
~$ echo 'hello world' > tutorial.txt
-
-
+First, create a simple CWL CommandLineTool: -Next, add the new file to the git index. +notextile.
~/tutorials$ nano hello.cwl
- -
~$ git add tutorial.txt
-
-
+ {% code 'tutorial_hello_cwl' as yaml %} + +Next, add the file to the git repository. This tells @git@ that the file should be included on the next commit. + +notextile.
~/tutorial$ git add hello.cwl
-Next, commit all the changes to the local repository, along with a commit message tht describes what this script does. +Next, commit your changes. All staged changes are recorded into the local git repository: -
~$ git commit -a -m "Added tutorial.txt"
+
~/tutorial$ git commit -m "my first script"
 
-Next, push the changes in the local repository to the remote repository. +Finally, upload your changes to the remote repository: -
~$ git push origin tutorial_branch
+
~/tutorial/crunch_scripts$ git push origin tutorial_branch
 
-Although this tutorial showed how to add a text file to Arvados, this tutorial should also show the necessary steps for adding your custom bash, R, or python scripts to an Arvados repository. +The same steps can be used to add any of your custom bash, R, or python scripts to an Arvados repository.