GIT-AND-GITHUB5 MIN READ
Sort Git State Before You Run the Command
Categorize Git changes by state so reset, restore, commit, push, and pull decisions are safer.
Sort each situation by where the change or decision currently lives. Working tree Staging index Local commits Remote branch Pull request layer A CSS typo appears in git diff but not in git diff --staged. A migration is ready in git diff --staged but has not been committed. Two commits exist on your laptop and are not on GitHub yet. The branch on GitHub has a commit your laptop does not have. A reviewer requested a change on line 42 of the PR. A required GitHub Actions check is red on the PR. A debug log is staged but should…
Read the full lesson
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in