- Create a personal fork of organization repository.
- Clone fork to your local machine.
- In the local clone of your personal fork:
git remote add upstream https://github.com/oslabs-beta/Catalyst.git
git checkout master
-> Make sure you're starting at your local master branchgit pull upstream master
-> Pull in any merged changes from organization mastergit push origin master
-> Update your remote fork with the new mastergit checkout -b <feature-name>
-> Create a new feature branch and switch into it- Work on your feature, committing to the feature branch only. Never work directly on
master
.
Your local master should always be an exact copy of the organization master.
git checkout master
-> Start on your local master branchgit pull upstream master
-> Get any new changes that have been merged since you started your featuregit push origin master
-> Update remote fork mastergit checkout <feature-name>
-> Switch to the feature branch you want to PRgit merge master
-> Merge the up-to-date master branch into your feature branch- Resolve any merge conflicts on the feature branch & commit resolved changes if needed.
git push origin <feature-name>
-> Push the new feature, with merge conflicts resolved, to your remote fork- On Github: Create a Pull Request from
<your-name>/<feature-name>
to<organization>/staging
- On your local copy:
git checkout master
git pull upstream master
git push origin master
If you are continuing work on the same feature:
git checkout <feature-name>
-> Switch to the feature branchgit merge master
-> Should fast-forward your feature branch to be even with current organization master
git log --graph --all --decorate