Skip to main content
LESSON 3 of 5//CLI in Software Development

Git from the command line

Git is the industry-standard version control system. While GUI clients exist, using git from the command line gives you full control and is essential for scripts, CI/CD pipelines, and advanced workflows.

Essential git workflowzsh // interactive
~git init # initialize a repo
~git add . # stage all changes
~git commit -m "feat: add login" # commit with message
~git push origin main # push to remote
# Branching workflow
~git checkout -b feature/auth # create & switch branch
# ... make changes ...
~git add -A && git commit -m "feat: implement auth"
~git push -u origin feature/auth
Inspection commandszsh // interactive
~git status # see changed files
~git log --oneline # compact commit history
~git diff # see unstaged changes
~git blame file.ts # who changed each line
PRACTICE//Try the commands from this lesson
INTERACTIVE_TERMINAL//sandbox
Practice terminal — try the commands from this lesson!
Type 'help' for available commands. Tab completion not available in simulator.
Try: