This is a Next.js project bootstrapped with create-next-app
.
A GitFlow is a defined strategy for managing Git branches, commit standards and Merge request procedures.
Common GitFlow tends to identify two different types of branches:
- feature: for the development of a new feature
- hotfix/bugfix: for the fixing of a bug (or overall performance improvements)
The nature of the git branches convention that we adopt allows us to identify quickly:
- The developer
- Nature of the task
- Issue (or Task) id.
- And the overall goal of the branch (short description).
Suppose that developer Sagar Jaglan, having Github username *imsagar, is in charge of developing the sign-up process assigned to him by the task with *id pheon-10. The branch created will use the following name:
Write a short note to describe the feature bug of the branch.
Now that we have defined a naming convention, we should also identify the branches' hierarchy. We should identify at least two (or tree) branches:
- Main: contains code deployed and available online to final users
- Testing (staging): contains code deployed to the testing environment (pre-release)
- Develop: includes the latest version of the codebase available as starting point to the developer.
the flow of pull requests will be
- feature -> dev -> testing -> master
Linters allow analysing of the overall quality code, indicating naming convention errors, duplicated code, and not-used imports (which overall may have a minimum impact on product performances).
Test your code, automate testing to avoid regression and know at any time:
- What is currently covered by automated testing or not
- Current coverage percentage.
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
Before publishing the branch always use the following command :
npm run build
This will help you to identify all the production errors in advance and after correcting them you can publish the branch. Then, create a pull request to feature branch -> dev branch and assign a reviewer.