Git WorkFlow - dave5801/emotion-reader GitHub Wiki
- Start from an up-to-date production branch
git checkout production
git pull origin production
- Create a new feature branch with
git checkout -b <branchname>
- Do work on your feature branch and add, commit, and push
git add <file>
git commit -m <useful message>
git push origin <feature_branch_name>
- On GitHub...
- Create a Pull Request (PR) for that branch on GitHub
- Have someone else review the code in the PR and merge it to production
WHEN A PULL REQUEST FROM SOMEONE ELSE'S <FEATURE BRANCH> IS MERGED TO PRODUCTION, EVERYONE MUST DO THESE STEPS
- commit changes to your feature branch
git add <file>
git commit -m <useful message>
- update your local production branch
git checkout production
git pull origin production
- update your feature branch with changes in production
git checkout <feature_branch_name>
git merge production
- handle merge conflicts if there are any
- Check all of your project files for the markers that indicate merge conflicts (in other words, the
>>>>>>>>>
andHEAD
stuff that has mysteriously appeared in your code)- Edit the code to remove the redundancies causing the merge conflict, and eliminate the markers
git add <affected-files>
git commit -m "merged production"
- Check all of your project files for the markers that indicate merge conflicts (in other words, the