RedbirdHacks official website: http://redbirdhacks.org
Ensure you are on master
git checkout master
Create and switch to a new branch (name it after what the feature is about, examples: fix-auth-bug, add-navbar, refactor-user-model)
git checkout -b your-branch-name
Do your work for this feature on this branch.
Notes:
git push -u origin your-branch-name
. Afterwards, you can just git push
while on that branch.There are two options for merging a branch - via pull request or locally.
Choose this if you want someone else to review your changes before you merge
Ensure you are on your feature branch
git checkout your-branch-name
Push your branch to server
git push origin your-branch-name (or just git push if your upstream is set)
Create a pull request via the Github GUI
Wait for review, start a discussion if necessary, etc.
Once your pull request is merged, you can delete your feature branch - it is no longer needed
git branch -d your-branch-name
Choose this if you don't want someone else to review your changes before merge
Ensure you are on the master branch
git checkout master
Pull down any changes
git pull
Merge your branch into master
git merge your-branch-name
Resolve any merge conflicts
git status
>>>> HEAD
, <<<<
, etc.git add
itgit commit
the mergePush master up
git push
Delete your feature branch - it is no longer needed, the changes on that branch now live in master
git branch -d your-branch-name
ONLY DO THIS WHEN MASTER IS STABLE
Ensure you are on production
git checkout production
Merge the master branch into the production branch
git merge master
There should be no merge conflicts. If there are conflicts, then something is wrong. Find the person who is to blame using the Github GUI and resolve the conflicts.
Push the updated production branch to the server
git push origin production // if you have set the upstream, just git push will do
Switch back to master
git checkout master