This page describes the development process for working on Springtail, from issue creation through merge.Documentation Index
Fetch the complete documentation index at: https://docs.springtail.io/llms.txt
Use this file to discover all available pages before exploring further.
Dev Process
-
Issue Creation:
- Create a new issue in GitHub.
- Clearly describe the feature’s functionality and purpose.
- Include relevant details, user stories, or acceptance criteria.
- Assign the issue to yourself if you will be working on it.
-
Branching:
- Once the issue is created, create a new development branch based on the
mainbranch (git checkout -b branch_name).- Use a descriptive branch name that references the issue number (e.g.,
123-featureor123-issue).
- Use a descriptive branch name that references the issue number (e.g.,
- Push the newly created branch to your remote repository on GitHub (
git push -u). - If the above push command does not work, do
git push --set-upstream origin <branch name> - If something is wrong and you need to delete remote branch, do
git push -d origin <branch name> - To delete local branch, do
git branch -d <branch name> - To see the list of remote branches and to verify that you have created a remote branch, do
git branch -r
- Once the issue is created, create a new development branch based on the
-
Development:
- Implement the feature code within your development branch.
- Make frequent commits with clear and concise commit messages that describe the specific changes made.
- The commit message should reference the GitHub issue, e.g.,
git commit -m "Fix bug reported ref #123"
- Use unit tests to ensure the functionality of your code.
- Run all tests locally prior to submitting a Pull Request.
- From root of the build tree (e.g., in
springtail/debug/) runmake test
- From root of the build tree (e.g., in
-
Pull Request Creation:
- Once development is complete, create a Pull Request (PR) from your development branch to the
mainbranch. - Reference the issue number in the PR title or description to link the feature to the initial request.
- Provide a clear summary of the changes made and the purpose of the feature.
- Request code reviews from other developers.
- Once development is complete, create a Pull Request (PR) from your development branch to the
-
Review and Merge:
- Address any feedback or suggestions received during the code review process.
- Make necessary code changes and push them to your development branch.
- Rerun all unit and integration tests.
- Once the code is approved for merging, contact @Garth or @Craig to merge into main.
- A squash merge option should be used to merge your changes into the
mainbranch. This creates a single commit representing the entire feature development.
- A squash merge option should be used to merge your changes into the
-
Bring your branch up to date with main:
-
Perform the following commands (best to have done a
git commitlocally before merging):
-
Perform the following commands (best to have done a
-
Pull in updates from a branch other than main
-
Perform the following commands:
-
If after merge command you want to revert to the pre-merge state, run
git reset --hard ORIG_HEAD -
To see the diff of the last commit, do
git diff HEAD^ -
If you want a remote branch with the name different than your local branch:
- Create branch:
git push --set-upstream origin <local branch>:<remote branch> - Push to remote branch:
git push origin HEAD:<remote branch>
- Create branch:
-
Perform the following commands:
-
Cleanup remote branch view from git:
git remote prune origin -
Delete local branch:
git branch -D <branch name> -
Restore uncommitted, but not staged file:
git restore <filename> -
Restore uncommitted, but staged file:
git restore --staged <filename>