Git Branching - PLUDevs/amethystforest GitHub Wiki
First upstream by typing the git command in your terminal/console/shell:
`git remote add upstream [email protected]:PLUDevs/amethystforest`
New features/tasks should be done in new branches based on upstream/develop
.
Create a new branch based on upstream/develop
shortcut:
git fetch upstream
git checkout -b feature/feature-name-here upstream/develop
Push branch to your fork on github:
git push origin feature/feature-name-here
# then create a pull request in github for this feature to upstream/develop
If the pull request is merge-able without conflicts (green) and tests have passed (if applicable), then we will merge the pull request.
If the pull request has conflicts (grey), then you must merge upstream/develop to resolve them
git fetch upstream
git merge --no-ff upstream/develop
# fix conflicts and then commit
# then push
git push origin feature/feature-name-here
This should automatically update the exiting pull request on github. It should show green (auto merge-able). We will then merge the pull request.
Create a new branch based on the production/live version that the bug was observed
git fetch upstream
git checkout -b hotfix/this-is-a-bug 1.2.3
It also helps to have the ticket ID in the branch name
git checkout -b hotfix/<ticket_id>-this-is-a-bug 1.2.3
View list of all versions
git tag