@@ -11,22 +11,45 @@ Please submit code using pull requests. Here is the basic workflow:
...
@@ -11,22 +11,45 @@ Please submit code using pull requests. Here is the basic workflow:
Gryphon version control and code management is performed using Git. For references on using Git please see https://git-scm.com/doc. In our examples we describe working with Git from a Linux command prompt. We will use basic Linux file and directory commands.
Gryphon version control and code management is performed using Git. For references on using Git please see https://git-scm.com/doc. In our examples we describe working with Git from a Linux command prompt. We will use basic Linux file and directory commands.
We access NPS GitLab using Git commands.
We access NPS GitLab using Git commands. To enable key-managed SSH authentication with NPS GitLab please install your RSA Public key, please see https://gitlab.nps.edu/-/profile/keys.
## Cloning the Gryphon repository
In these examples we will work with a clone of the Gryphon repository that we will install under folder `gitlab`. We create this work folder in our home directory by typing:
Some preparation is required:
* Install your RSA Public key on NPS GitLab to enable key-managed SSH authentication, please see https://gitlab.nps.edu/-/profile/keys.
* Identify a folder to do this work in. In this example we crate folder `gitlab` in our home directory. Open a Linux command window and type:
mkdir ~/gitlab
mkdir ~/gitlab
Now clone the Gryphon repository:
## Clone the Gryphon repository.
Please set up GitLab with your SSH RSA key and please set up a working directory on your local machine as described above, and then clone the Gryphon repository:
When you clone a repository it places you on the "master" branch. Create a branch to work on. Once you have made changes and added code, those changes can be merged via a pull request.
Create a branch name for your work. For example to start work on new branch "my fix" type:
git checkout -b "my fix"
For example to work in folder `gitlab` in our home direc
## Add code
Add code, make changes, etc. To see changed files:
Clone the Gryphon
git status
\ No newline at end of file
Here you may see files indicated as changed or new. To see specific changes, type:
git diff
When ready, stage these changes for inclusion into your "my fix" branch. For example add file "my_new_file.py":
git add my_new_file.py
Now typing `git status` will show that files are staged. Commit these changes to the "my fix" branch, including a present-tense statement about the change, written as an action:
git commit -m "fix misleading wording"
This commits your change to your clone of the repository, but it does not push your change upstream to the NPS GitLab Server. For that, push your branch upstream to the origin:
git push -u origin "my fix"
## Submit a pull request
Once your branch is uploaded, create a pull request on GitLab (GitLab calls this a merge request):
* From your browser, open the NPS GitLab repository at https://gitlab.nps.edu/monterey-phoenix/user-interfaces/gryphon/-/tree/master