This repository contains fake code that can be used to practice GitHub commands and workflows. This repository is purely for training purposes.
-
Click the "Fork" button in the top right corner of this page to create a fork off of the
nircam-training
repository. -
Make a local clone of your fork (click the green "Clone" button).
- using SSH (
git clone git@github.com:<your_username>/nircam-training.git
) - using HTTPS (
git clone https://github.com/<your_username>/nircam-training.git
)
- using SSH (
-
Change directories to the
nircam-training
directory:cd nircam-training
-
Run the setup script:
python setup.py install
-
Make sure your fork is pointing to the right places:
git remote -v
You should see:origin git@github.com:<your_username>/nircam-training.git (fetch)
origin git@github.com:<your_username>/nircam-training.git (push)
If that is not what you see, type:
git remote set-url origin git@github.com:<your_username>/nircam-training.git
. -
Make sure your fork is pointing upstream properly by typing:
git remote add upstream git@github.com:spacetelescope/nircam-training.git
You should see:
upstream git@github.com:spacetelescope/nircam-training.git (fetch)
upstream git@github.com:spacetelescope/nircam-training.git (push)
-
Create a branch on your personal fork:
git checkout -b <branch_name>
-
Make your software changes and then stage them:
git add changed_file.py
-
Commit your new file with a description of the change:
git commit -m "Made a change"
-
Push that branch to your personal GitHub repository (i.e.
origin
):git push origin <branch_name>
-
On the
spacetelescope
nircam-training
repository, create a pull request to merge your changes intospacetelescope:master
. -
Assign a reviewer from the team for the pull request.
-
Delete your local copy of your branch.
- Bryan Hilbert @bhilbert4
- Alicia Canipe @aliciacanipe