opensource-nepal / commitlint

commitlint is a tool designed to lint your commit messages according to the Conventional Commits standard for your pre-commit hook and GitHub Actions.
GNU General Public License v3.0
16 stars 9 forks source link

docs: update readme to include CLI #32

Closed martincarapia closed 6 months ago

martincarapia commented 6 months ago

Description

Update README.md to include CLI.

Related Issue

Fixes #29

Type of Change

Please mark the appropriate option below to describe the type of change your pull request introduces:

Checklist

By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.

aj3sh commented 6 months ago

Sorry, I forgot to mention that we need to install the commitlint before using it.

pip install commitlint
aj3sh commented 6 months ago

Your commit still contains the Closes issue #29 text in the header. Please edit your commit message.

martincarapia commented 6 months ago

Alright fixed. Everything should be good.

aj3sh commented 6 months ago

Alright fixed. Everything should be good.

Now your PR has 7 commits. This can be fixed if you rebase your branch from the main branch.

martincarapia commented 6 months ago

Rebased.

aj3sh commented 6 months ago

@martincarapia, You somehow accidentally added some unnecessary commits to your branch. Consequently, your PR has four commits and two of them already exist in the main branch. I have added an image for the clarification.

However, this can be fixed using an interactive rebase. Make sure your branch updates with the main branch.

git fetch origin main
git rebase origin/main

Once the rebase is complete, you can use the interactive rebase.

git rebase -i 8761e42

where 8761e42 is the last commit of the main branch.

Using interactive rebase, you can delete unnecessary commits, squash two commits, reword the commits, and more.

Moreover, your commit header cannot end with period (.), and the best practice is to keep one commit for one PR.

Screenshot 2024-04-06 at 9 56 20 AM

Reference: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History https://medium.com/swlh/tutorial-on-interactive-rebasing-e3f49505b2ce

martincarapia commented 6 months ago

Thank you for your clarification, and thank you for your patience. I'm new to all of this.