-
Notifications
You must be signed in to change notification settings - Fork 59
Getting Started with Development
The following are instructions for getting started with development on the Proteus project:
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.
Make a local copy of your fork.
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.).
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
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.