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

 
 
 

Contributors