Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

docs: add commit cli #657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ venv.bak/

# build
poetry.lock

# macOSX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest we don't add it to project .gitignore. It should be added to somewhere like ~/.gitignore based on platform's need

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before removing it let me fight a bit for this modification:

.DS_Store files are generated by mac computer all the time. Lucky me I didn’t execute the lib itself so there is just one but they can appear in any folder. All Mac IDE are hiding them from us meaning that before git add I simply don’t know where they are. If you refuse to add this line to the .gitignore you simply deny to all mac users the possibility to use git add . which can be a real pain when modifying many files.

Let’s have a look at the .gitignore itself. it’s not a « commitizen » specific file but the github template for Python language with small customization. It includes:

  • IDE specific folders (.vscode)
  • sphinx folders (docs/_build/)
  • all the django related files
  • translation files (.mo, .po)
  • scrappy stuff
  • All the distribution files including things unrelated to the project
  • unitesting from the most known tools (coverage, nosetest and tox) even though tox is not part of your lib

meaning that the .gitignore already includes things that no developer will ever need as it’s unrelated to the project. I don’t understand why 1 extra line that will be useful for all mac users seems too much. it’s present in all the open-source projects I contribute in like: opensartoolkit, pydata-sphinx-theme, sepal_ui, pygadm

let me know if even after my little speech you still want me to remove it and I will. 😢

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @12rambau thanks for sharing the thought in such detail! tl;dr, you convinced me to accept it in this project.

I just found out we also add .idea and .vscode into the .gitignore. Thus, adding .DS_Store could make sense to this project.

Not adding these stuff is kinda my personal preference which was suggested by others back to the time I contributed to git-extras. They suggested me adding these config to my local development environment. Otherwise, we'll need to add lots and lots different kinds of temp file and config into .gitignore. Just share the reason why I asked you to remove it at the first place 🙂

.DS_Store
11 changes: 11 additions & 0 deletions docs/commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
![Using commitizen cli](images/demo.gif)

## About

In your terminal run `cz commit` or the shortcut `cz c` to generate a guided git commit.

A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`.

!!! note
To maintain platform compatibility, the `commit` command disable ANSI escaping in its output.
In particular pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417).
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nav:
- Introduction: 'README.md'
- Commands:
- Init: 'init.md'
- Commit: 'commit.md'
- Bump: 'bump.md'
- Check: 'check.md'
- Changelog: 'changelog.md'
Expand Down