Public:Working with code repo
From YaddaWiki
- Create a feature branch: git checkout -b feature_branch_name (feature_branch_name should start with your github login)
- Make your changes
- Commit your changes
- [Optionally, so the pull request will be more up-to-date] Clean up your history: git rebase master
- Run tests: gradlew clean test and gradlew clean slowTest
- Push the changes: git push origin feature_branch_name
- Issue a pull request on github (or merge request on GitLab) with master as the base branch and feature as the head branch
- Wait for changes to be accepted. If you are asked to revise your changes, edit your branch and push the changes.
- Clean up your history: git rebase master
- Merge the feature branch into master: git checkout master and then git merge feature_branch_name (or git merge --squash feature_branch_name if there are more than 1 commit in the feature branch)
- If merge was done with --squash option, then commit merged changes and modify commit message: git commit
- Pull the changes from origin: git pull --rebase origin (or git fetch origin and git rebase origin/master)
- Run tests before push: gradlew clean test and gradlew clean slowTest
- Push the changes to the master branch: git push origin master
- Delete the feature branch: git branch -D feature_branch_name and then git push origin :feature_branch_name
- [Optionally] Delete references to remote branches that do not exist in the repository anymore: git remote prune origin