Branching and Merging - 8ude/TechProduction_Spring2019_FemaleRoleModelProject GitHub Wiki
This is a looong overdue explanation on how to Branch and Merge -- EVERYONE should follow this protocol (including Corey).
DO NOT WORK ON THE MASTER BRANCH
working on the master is fine if you're on a team of 4 people or less, and even then it's not as safe as submitting pull requests
you should make a branch with your own name. if you have multiple branches, consider deleting them, or merging them into one.
MERGING:
Let's say Kiara and Alex were both working on art things, committing and pushing to their own branches (named "Kiara" and "Alex" after every animation that they made, and Kiara wants to use Alex's assets.
Kiara should commit and push her changes: git commit -m "Avatar animation changes" git push origin Kiara
(assuming her branch is named Kiara)
then, she should run
git merge Alex
to merge Alex's branch with her own
If we have conflicts in binary files (pretty much anything that isn't code), we will need to choose which person's files to keep. Follow this post on how to choose individual files. If you're worried about losing work, you can create an archive of the entire unity project before you start the process, and there are ways to go "back in time" to previous git commits.
Let's say that we're done with the feature we were working on, we've pushed to our branch, and want to merge it with the master - to do this, we need to submit a pull request.
Go onto the github website. Go to branches, and navigate to your own branch

Click on Pull Request
Write a brief summary of your pull request - what you did on this branch since the last merge. Then hit "create pull request"

Github will see if it can automatically merge the branches (this is the best case scenario). If it can't, you may need to resolve merge conflicts.
Click "Create Pull Request"

You might be tempted to click "Merge Pull Request" - DO NOT DO THIS. Have another team member or Prof Corey (preferably Prof Corey) Look over the changes and click Merge Pull Request.

If it can't be automatically merged, and has conflicts, you will need to merge the Master into your branch. Lets say Alex's branch is too far behind the master or has conflicts - she would do
git checkout master git pull origin master
to make sure that her copy of the master branch is up to date
then she would do
git checkout Alex git merge master
Which would merge the master onto Alex's branch. Then she would resolve the conflicts, push to the remote, and take a look at the pull request again. It should magically turn green.