Skip to content

Sanjar-swe/productive-git-commit-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

# πŸš€ Productive Git Commit Helper

> 🧰 _A beginner-friendly script to speed up your Git workflow with one simple command!_

---

## 🟒 Start Here β€” Easiest Way to Use

πŸ’‘ **Just copy and paste this in your terminal:**

```bash
read -p "πŸ“¨ Enter commit message: " msg; git add .; git commit -m "$msg"; git push
```

πŸ”Ή This will:

  • Ask you for a commit message
  • Stage all your changes
  • Commit with the provided message
  • Push to your remote repository

βœ… Example:

πŸ“¨ Enter commit message: Fix typo in README

The script will automatically run:

git add .
git commit -m "Fix typo in README"
git push

πŸŽ“ Why Is This Useful?

Perfect for:

  • πŸ‘¨β€πŸ’» Solo developers and small teams
  • ⚑ Fast prototyping and frequent commits
  • 😌 Reducing repetitive typing

πŸ“¦ Bonus: Use in a Makefile (Optional)

🧱 Create a Makefile in your project folder and paste this content:

commit:
	@git add .
	@read -p "πŸ“¨ Enter commit message: " msg; \
	git commit -m "$$msg"; \
	git push

Now every time you want to commit:

make commit

βœ… No more copy-pasting long Git commands.


βš™οΈ Advanced: Set up as a Terminal Alias

If you want to make this a global shortcut:

  1. Open your shell config file:

    • ~/.bashrc (for Bash)
    • ~/.zshrc (for Zsh)
  2. Add this line:

alias gpush='read -p "πŸ“¨ Enter commit message: " msg; git add .; git commit -m "$msg"; git push'
  1. Reload your config:
source ~/.bashrc   # or ~/.zshrc
  1. Now use it anytime with:
gpush

πŸš€ That’s it!


πŸ§‘β€πŸ’» Contributing

Feel free to fork this idea, improve the script, or suggest new features via pull request. Let’s help more developers stay in flow and productive. ⚑

About

A simple CLI tool to streamline Git commits and pushes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published