Weekly visits frontend only
Squashing
We squash commits on a branch before merging because we want a single commit with a correctly formatted commit message.
Do the following on your local machine to squash the commits. The commands are shown as running from the root of the project, but they can be run from anywhere.
-
Use the Code button above to get the Step 1 commands to check out the branch locally.
-
Run the following command to squash the commits on your feature branch.
commands/premerge-squash.sh
-
When your editor opens, write a multi-line commit message formatted correctly as a conventional commit.
An example of a conventional commit is given below.
Adds a feature to GuestInfoFrontend that allows the user to see how many visits the entered BNM ID has made in the current week. Co-authored-by: Nolan Raymond <@nraymond747> Co-authored-by: Aidan Palmer <@AidanPalmer> Co-authored-by: Ben Jacobsen <@bjac_mp4> Co-authored-by: Jayme Page <@jpage02> Closes #38
Here are some common types.
- `feat:` - A commit that adds new functionality from the client's perspective.
- `fix:` - A commit that fixes a bug in existing functionality from the
client's perspective.
- `refactor:` - A change to production code that add new functionality
or fix a bug from the client's perspective. However, it may remove
functionality (which should have an exclamation point `refactor!:`).
Typically used to redesign product code to make it easier to add more
functionality or improve performance in the future, or to make the
code more readable and understandable.
- `docs:` - A change in the documentation or documentation system.
- `build:` - A change in the build system.
- `test:` - A change in a test or the test system.
- `ci:` - A change in the continuous integration and delivery/deployment system.
- `chore:` - A task performed to maintain the system. E.g., bumping the
version number of the product. Upgrading the version of a dependency.
These changes do not improve anything, but must be done as part of
normal operation.
The definition of "client" depends on the project. For the API
project, its clients are Frontend and Backend. For the Frontend, its clients are people who use the frontend.
4. Save the commit message and close your editor.
5. Run the following command to push your squash commit to GitLab.
```bash
git push --force origin $(git branch --show-current)
```
Ref #38
Edited by Nolan Raymond