GitHub url: https://github.com/
JCSDA-Internal: https://github.com/JCSDA-internal
JCSDA-Core: https://github.com/JCSDA-internal/JCSDA-core
New employee GitHub setup:
Information on how to get GitHub set up as a new employee can be found at the JCSDA-Core Onboarding Wiki. If you are so new and cannot see this page yet, your team lead will need to add you to the JCSDA-internal and JCSDA repositories.
JCSDA Repository Development
When contributing to a JCSDA repository, you will clone the repo and create a branch with your changes. Then issue a Pull Request (PR) with at least 2 reviewers before it can be merged back into the develop branch. This section contains a simple outline of the commands used to do that. More information can be found in the JEDI documentation Best Practices for Developers.
To clone a repository (if not already done so):
git clone https://github.com/JCSDA-internal/<repo_name>
To check which branch you are on:
git branch -a
- To checkout a new branch:
git checkout -b feature/<branch_name>
- To check the status of your branch and changes made:
git status
- To stage all of the files modified for a commit:
git add --all
- To make a commit with a useful description:
git commit -m "add description of change here"
- When ready to create a PR or draft PR, push your branch back to the origin:
git push -u origin feature/<branch_name>
- Next go to the GitHub url and create a PR from the new branch, be sure to add your team's designated tags (such as "INFRA") and other necessary fields
Other useful commands:
- Stashing
- To "stash" or save work for later:
git stash
- To see what you have stashed:
git stash list
- To retrieve your stashed work:
git stash apply stash@{2}
- Helpful stash article can be found here
- To "stash" or save work for later:
- Branch edits
- To see changes made to an existing file:
git diff path/to/filename
- To restore one modified file:
git restore path/to/filename
- To restore all uncommitted edits of the branch:
git restore .
- To see changes made to an existing file:
Credentials
Before doing a JEDI build or development, it is a good idea to set up your GitHub credentials. This can be done by following this section in the JEDI documentation.