Git from Cerewro: complete workflow
Run the full Git work cycle directly from the Cerewro chat: view changes, create commits, push to remote, manage branches and resolve conflicts. The AI interprets results and suggests the next step.
Day-to-day essential commands
Check repository status
git status
git log --oneline -10 # last 10 commits
git diff # unstaged changes
git diff --cached # staged changes
Stage and commit
git add .
git commit -m "feat: add JWT authentication endpoint"
git commit -am "fix: fix email validation"
Sync with remote
git pull origin main
git push origin main
git push origin main --force-with-lease
Branch management
Create, switch and merge branches
git switch -c feature/new-feature
git checkout main
git merge feature/new-feature
git branch -d feature/new-feature
git push origin --delete feature/new-feature
| Situation | Git Command |
|---|---|
| Undo last commit (keep changes) | git reset --soft HEAD~1 |
| Undo last commit (discard changes) | git reset --hard HEAD~1 |
| Revert an already published commit | git revert <hash> |
| Stash changes without committing | git stash |
| Recover stashed changes | git stash pop |