Git — Daily Workflow and Command Reference
Git — Daily Workflow and Command Reference Daily Workflow bash git status # check what changed git add . # stage all changes git add path/to/file # stage specific file git commit -m "message" # commit git push # push to remote git pull # pull from remote Branching bash git branch # list branches git checkout -b feature-name # create and switch git checkout main # switch to main git merge feature-name # merge branch git branch -d feature-name # delete branch (merged) git branch -D feature-name # force delete Viewing History bash git log --oneline # compact log git log --oneline --graph # with branch graph git diff # unstaged changes git diff --staged # staged changes git show abc1234 # show specific commit Undoing bash git restore file.php # discard unstaged changes git restore --staged file.php # unstage file git reset HEAD~1 # undo last commit (keep changes) git reset --hard HEAD~1 # undo last commit (discard changes) git revert abc1234 # reverse a commit (safe for shared) Remote bash git remote -v # list remotes git remote add origin [url] # add remote git fetch origin # fetch (don't merge) git push -u origin main # set upstream and push git clone [url] # clone repo Stash bash git stash # stash changes git stash pop # restore stash git stash list # list stashes git stash drop # discard top stash Config bash git config --global user.name "Jamey" git config --global user.email "[email protected]" git config --global core.editor "nano" git config --list
Related Guides
- Vectric Aspire — Toolpath Settings Quick Reference
- LightBurn — Keyboard Shortcuts and Workflow Tips
- Orca Slicer — Global Settings Reference
- MariaDB — Common Queries and Admin Reference
- PHP 8.3 — Features and Syntax Quick Reference
- UGS (Universal Gcode Sender) — Settings and Macro Reference
- Home Workshop Safety Reference — PPE, Fire, Fumes
- Wolfpawn 4040 Pro — Feeds and Speeds Quick Card