4.2 Daily Workflow
After learning individual commands, you also need a stable work order. A good Git workflow reduces confusion and makes problems easier to locate.
Before starting: inspect state
bash
git status
git branchConfirm which branch you are on and whether the working tree is clean. Many Git problems are not caused by command syntax, but by editing on the wrong branch for too long.
Loading concept check...
While working: commit in small steps
One commit should usually express one clear purpose. For example:
bash
git add app/login.tsx
git commit -m "Add login form validation"If one commit changes login, styling, database code, and documentation at the same time, future debugging becomes much harder.
Before pushing: check again
bash
git status
git log --oneline -5
git pushgit status confirms that you did not forget changes. git log --oneline -5 helps you inspect the latest few commits.
A compact daily flow
bash
git switch main
git pull
git switch -c feature/small-task
# edit files
git status
git add .
git commit -m "Add small task"
git push -u origin feature/small-taskNote
Do not treat Git as a final cleanup step. A better approach is to finish small goals and create small, clear commits along the way.