Skip to content

Getting Started with Development

Alvin Zhang edited this page Feb 4, 2020 · 7 revisions

The following are instructions for getting started with development on the Proteus project:

1. Fork the repository

On the project homepage, click on the Fork button in the upper-right corner. This will make a copy of the Proteus repository in your GitHub account. This copy will have identical branches as the original repository but it will not track the original repository. So updates on the original repository will not be reflected in your fork by default. This is not a huge issue because we can handle that with remotes discussed in section 3.

2. Clone the fork

Make a local copy of your fork.

3. Add the original repository as a remote

When you push/pull changes into your local repository, it is done based on a remote repository (the one on GitHub). You can check which remotes are associated with your repository through git remote -v. By default, there will be a remote named origin which is associated with where you cloned your repository. You can add the original repo as a remote as well through:

git remote add upstream [email protected]:erdc/proteus.git

You can then get updates from the upstream remote through git fetch upstream. The keyword upstream was arbitrarily chosen; it can in fact be anything you choose (e.g. radish, puppy, originalRepo, etc.).

4. Checkout master and making a feature branch

Once you've added the remote and updated it, you can start developing based on the master branch:

git checkout upstream/master

You now have a local copy of the original repository's master branch. If you want to add additional features, you can do

git checkout -b nameOfBranch

and then make the commits as usual. When you need to push to a remote repository, you should push to origin, your fork of the original repository:

git push -u origin nameOfBranch

5. Pull requests

From the fork, you can then start a pull request against the original repository with your feature branch.

The process may seem unnecessarily long, but it helps keep the original repository free of unnecessary branches and of unintended changes.

Clone this wiki locally