Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# Check the state of your working directory: git status # Shows: untracked files, modified files, staged changes # Stage specific files: git add index.html git add src/app.js src/utils.js # Stage all changes in the current directory: git add . # Commit staged changes with a message: git commit -m "Add homepage layout" # Stage and commit tracked files in one step (skips git add): git commit -am "Fix typo in header" # Write a multi-line commit message (opens your editor): git commit # Anatomy of a good commit message: # ───────────────────────────────────────── # feat: add user authentication endpoint <- subject (≤72 chars) # <- blank line # Implement JWT-based login route that <- body (explains WHY) # validates credentials against bcrypt # hashes stored in the database. # ───────────────────────────────────────── # View commit history: git log git log --oneline # compact format git log --oneline --graph # with branch graph
Result
Open