Contributing to Development - darkhelmet-gaming/dhmc GitHub Wiki
Git Tips
When using an upstream, it's easiest to fetch/rebase your local repo before beginning new work.
Your local master
branch should always match the upstream.
get checkout master
- Make sure you're on master
git fetch upstream
- Fetch reads the remote repo so your git will know what's changed, but won't make any changes locally
git pull --rebase upstream/master
- Rebases your local branch with new work from upstream
When you do work and open a PR, it's best to do that from a new branch:
git checkout -b a-branch-name
Do your work, commit, push that branch, and open a PR. Once the PR is merged, you can do the rebase steps on your local master and delete your branch.
You can also use those rebase master on the branch so you're 100% up to date. Rebasing will "rewind" your work, apply everything new from upstream, and re-apply your work fresh.