# Git Workflows — gitbash vs plain git
Gitbash reduces repetitive typing and provides interactive previews and safe cleanup.
- Plain git: ~900 typed characters
- Gitbash: ~300 typed characters
| Action / Grouped Steps | gitbash | git |
| ------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- |
| Checkout base branch | `switch main` | `git switch main` |
| Create feature branch (from latest main) | `create PROJ-123 add login` | `git switch -c feature/PROJ-123-add-login main`
`git push -u origin feature/PROJ-123-add-login` |
| Create a stash (WIP) | `stash "WIP PROJ-123 implement login"` | `git stash push -u -m "WIP PROJ-123 implement login"` |
| Create + switch to another branch (ensure main up-to-date) | `create --bugfix OTHER-456 fix typo` | `git switch main`
`git pull origin main`
`git switch -c bugfix/OTHER-456-fix-typo main`
`git push -u origin bugfix/OTHER-456-fix-typo` |
| Implement changes on other branch, commit & push | `commit -p "fix(OTHER-456): fix typo"` | `git add -A`
`git commit -m "fix(OTHER-456): fix typo"`
`git push -u origin bugfix/OTHER-456-fix-typo` |
| Switch back to original Jira branch | `switch PROJ-123` | `git switch feature/PROJ-123-add-login` |
| Verify main was up-to-date at creation time
Update feature branch by merging current `main` into it | `update` | `git fetch origin`
`git log --oneline HEAD..origin/main`
`git pull origin main` (run while on feature branch) |
| Review changes (status + diff) | `status` | `git status`
`git diff` |
| Stage & commit | `status` → stage
`commit -p "PROJ-123: implement feature X"` | `git add -A`
`git commit -m "PROJ-123: implement feature X"`
`git push origin feature/PROJ-123-add-login` |
| Create Pull Request (open compare page) | `pr` | Open browser
`https://github.com///compare/feature/PROJ-123-add-login?expand=1` |
| Merge PR & update local main | `switch main` | `git switch main`
`git pull origin main` |
| Create next branch from latest main | `create PROJ-124 implement next thing` | `git switch -c feature/PROJ-124-new-thing main`
`git push -u origin feature/PROJ-124-new-thing` |
| Clean up merged local branches | `cleanup` | `git fetch --prune origin`
`git branch --merged main`
`git branch -d ` |
| List / show stashes | `stashes` | `git stash list`
`git stash show -p stash@{0}` |
| Apply / remove stash | `unstash` | `git stash apply stash@{0}`
`git stash drop stash@{0}` |
| Clean up stashes | `cleanstash` | `git stash clear` |
Notes
- This document compares a full feature workflow step-by-step.
- The "gitbash" column assumes the commands from gitbash are installed globally (no `gitbash` prefix). Example Jira keys: `PROJ-123`, `OTHER-456`.