Git Jira Workflow - CPSECapstone/Turtle GitHub Wiki
Git / Jira Workflow
Setup
- Set up local fork
- Go to https://github.com/CPSECapstone/Turtle
- Click on the Fork button to create your own copy of the repo
- Click on the number next to Fork to go to your fork
- Click the Code dropdown to find your HTTPS url
- Copy that and make a local repo using that url
- git clone URL
- Use this local repo as the place you make changes
- Set up upstream connection
- Go to https://github.com/CPSECapstone/Turtle
- Click the Code dropdown to find your HTTPS url
- Copy that and use it to create your upstream
- git remote add upstream URL
- Test it with
- git remote
Basic
- Pull issue from _Todo _to In Progress in Jira
- Checkout and update develop branch
- _git checkout develop
- _git pull upstream develop
- Checkout a new branch for your issue
- git checkout -b TUR-69
- Name the branch after the issue name on Jira
- Do work
- Checkout and update develop branch (see 2)
- If changes in develop see rebasing
- Checkout current branch
- git checkout TUR-69
- Push branch to origin
- git push origin TUR-69
- Create a new Pull Request on github
- https://github.com/CPSECapstone/Turtle/pulls
- Make sure its merging your local branch into the upstream develop branch
- Write a short description as well as the name of the issue as the title
- Assign someone to review your code
- Review all code before submitting
- In Jira move your issue from In Progress to Code Review
Rebasing
- Imagine 2 people are working on the same file for separate issues and the other person gets their issue merged in first
- _git checkout develop
- _git pull upstream develop
- git checkout TUR-69
- git rebase develop
- If there are merge conflict fix them and add all changed files to staging
- Then run the command to continue
- git rebase --continue
- Force push the changes upstream
- git push -f origin TUR-69