noknow.dev
Sign inSign up
Course overview
Git — Complete Course
0 / 24 lessons0%

Git Basics

  • git init — Starting a Repository
  • git add + git commit — Your First Commit
  • git status + git log — Reading the State
  • git diff — Seeing What Changed
  • .gitignore — Ignoring Files

Branching

  • git branch + git switch — Working with Branches
  • git merge — Combining Branches
  • Resolving Merge Conflicts
  • Cleaning Up Branches

Remote Repositories

  • git remote — Connecting to a Remote
  • git push — Uploading Your Commits
  • git fetch + git pull — Getting Remote Changes
  • git clone — Copying a Repository

Undoing Changes

  • git restore — Discarding Uncommitted Changes
  • git reset — Moving HEAD Back
  • git revert — Safely Undoing a Commit
  • git stash — Temporarily Saving Work

Rewriting History

  • git commit --amend — Fixing the Last Commit
  • git rebase — Cleaner History
  • git cherry-pick — Applying Specific Commits

Advanced Tools and Workflows

  • git tag — Marking Releases
  • Mastering git log
  • git bisect — Finding Bugs with Binary Search
  • Professional Git Workflows

git status + git log — Reading the State

0m 00s

Knowing What's Going On

git status is your most-used command. It shows:

  • Which branch you're on
  • Files changed but not yet staged (red)
  • Files staged and ready to commit (green)
  • Untracked files (new files Git doesn't know about yet)
git status
# On branch main
# Changes not staged for commit:
#   modified:   app.js
#
# Untracked files:
#   new-file.txt

git log — browsing history

git log                    # full details
git log --oneline          # short: hash + message
git log --oneline --graph  # with branch graph
git log --oneline -5       # last 5 commits only
git show abc1234           # full details of one commit

Your Task

The repo already has two commits. Make a third commit: modify app.txt so it contains v2, then stage and commit it with message "Update app to v2".

Back
bashCtrl+Enter to run
Output

Click "Run" to execute your code.