Git & GitHub Command Generator
Generate commands + copy + download script (codingwithsonu.com)
Home
🌙 Dark
Clear
Copy Commands
Download .sh
Choose what you want to do
Select tab → fill inputs → commands appear on right
Tip: press
Ctrl
+
C
after copy
Basic
Branch
GitHub Setup
Undo / Fix
Stash
Advanced
Action
Check status
Clone repository
Pull latest
Add files
Commit changes
Push to remote
View log
──────────
How many collaborators
Particular author commit list
All commit list
Last 10 commits
Last 30 days commits
Most common everyday commands.
Branch (for pull/push)
Example:
main
or
master
or
develop
Repository URL (for clone)
Add Mode
Add all (git add .)
Specific file(s)
If you choose specific files, write them below.
Files (space separated)
Commit message
Author name (for author commits)
Branch Operation
List branches
Create new branch
Switch branch
Delete local branch
Delete remote branch
Rename branch
Branch commands for daily workflow.
Branch name
From branch (for create)
New name (for rename)
Remote name
Setup Type
Init + first push (new project)
Add remote + push existing
Change remote URL
Helps you connect local project to GitHub quickly.
Main branch name
GitHub repo URL
Use the
.git
URL for best results.
Remote name
First commit message
Fix Type
Unstage all (keep changes)
Unstage one file
Discard changes in file
Discard changes in ALL files
Undo last commit (keep changes)
Undo last commit (delete changes)
Revert a commit (safe)
Reset hard to commit
Hard
actions can delete work. Use carefully.
File (for unstage/discard)
Commit hash (for revert/reset)
Get it using
git log --oneline
Notes
Stash Action
Stash save (with message)
Stash list
Stash apply latest
Stash pop latest
Stash drop by index
Stash clear all
Great when you need to switch branch quickly.
Message / Index
Advanced Action
Set upstream on push
Force push (with lease)
Interactive rebase (last N commits)
Cherry-pick commit
Create tag + push
Clean untracked files
For experienced workflows.
Value (depends on action)
Remote
Branch
For tag action, Value = tag name like
v1.0.0
. For rebase, Value = number of commits like
3
.
Generated Commands
Copy or download as script
Live
Commands Preview
Copy
Download
Fill Example
Download creates a
git-commands.sh
file. On Linux/Mac you can run:
chmod +x git-commands.sh
then
./git-commands.sh