Generate git commands from common workflows. Copy-paste ready commands.
git rebase -i for interactive commits before pushingGit Β· CLI Β· workflows
Build common Git commands with a guided helper and copy them into your terminal. Useful when you remember the goal (βundo last commit but keep changesβ) better than the exact flag combination.
Gitβs power is also its footgun surface: reset, rebase, and force-pushes change history in ways that affect teammates. This page helps assemble standard command lines for everyday tasks. It does not connect to your repository, run Git for you, or replace reading git status before destructive operations.
git status / git log --oneline -5 before pushing shared history changes.| Goal | Typical commands |
|---|---|
| See what changed | git status, git diff |
| Save work | git add -p, git commit -m "β¦" |
| Update from remote | git fetch, git pull --rebase |
| New branch | git switch -c feature/name |
| Undo unstaged edits | git restore <file> |
| Unstage | git restore --staged <file> |
History rewriting: git reset --hard, rebase of published commits, and push --force can discard work or disrupt collaborators. Prefer --force-with-lease over bare --force, and coordinate on shared branches.
Write why the change exists, not only what files moved. Conventional prefixes (fix:, feat:, docs:) help changelogs. Keep secrets out of messages and out of history β rotating a leaked key is harder than not committing it.
No. It only builds command text. You run them locally in a clone.
Wrong directory, detached HEAD, protected branch rules, or conflicts. Read the Git error; git status is usually the next step.
The helper UI is static client-side. Privacy Policy.