Commit all the files that are already tracked by git without adding them to staging area Untracked files will not committed to the repo
The --amend
is an command that is used to fix mistakes that was made in the last commit
This can be used to add new files and changes to the commit message as well
Add new files to the last commit without changing the commit message
Important
--amend
commands should only be only used in local copy of repo--allow-empty
flag can be used to make a commit without any changes
Commit Message
Prefix | Description | Example |
---|---|---|
feat | A new feature. | feat: Add user authentication |
fix | A bug fix. | fix: Resolve crash on login |
docs | Documentation changes. | docs: Update README for installation instructions |
style | Changes that do not affect the meaning of the code. | style: Format code with black |
refactor | A code change that neither fixes a bug nor adds a feature. | refactor: Simplify user service logic |
perf | A code change that improves performance. | perf: Optimize image loading |
test | Adding missing tests or correcting existing tests. | test: Add unit tests for authentication |
chore | Changes to the build process or auxiliary tools. | chore: Update dependencies |
build | Changes that affect the build system or external dependencies. | build: Add webpack configuration |
ci | Changes to CI configuration files and scripts. | ci: Update GitHub Actions workflow |