Git
This folder has no README. Everything inside it is listed below.
Notes
- Git: the commands that get asked about 6 Nobody is tested on git add. What gets probed is the handful of operations where getting it wrong costs someone else their afternoon: rewriting shared…
- Merge vs Rebase 5 The most-asked git interview question. Both integrate changes from one branch into another; they produce different histories and have different trade-offs.
- Interactive Rebase 6 git rebase -i (interactive) is the swiss-army knife for cleaning up commits before they get merged.
- reset, revert, checkout, restore 6 Three (now four) commands that all "undo" something but operate at different levels: working tree, staging area, branch pointer, history.
- Reflog and Recovery 6 The reflog is git's safety net. Every time HEAD or a branch pointer moves, git records it locally.
- Bisect — Find the Commit That Broke It 5 git bisect does binary search through commit history to find the first commit that introduced a bug.
- Stash — Save Work Without Committing 6 git stash shelves uncommitted changes so you can switch context (pull, switch branches, hotfix) and come back.
- Cherry-pick — Apply a Commit From Another Branch 6 git cherry-pick <sha> takes the changes introduced by a specific commit and applies them as a new commit on the current branch.
- Worktrees — Multiple Checkouts of One Repo 6 git worktree lets you have multiple branches checked out at the same time, in different directories, sharing one .git directory.
- Branch Strategies 6 How a team decides what branches exist, who creates them, and how they merge.
- Pull Request Workflow 6 A PR (or "merge request" in GitLab) is a proposal to merge a branch into another, plus the review/CI machinery around it.
- Merge Conflict Resolution 6 A conflict happens when git can't auto-merge changes — typically when two branches modified the same lines (or one deleted a file the other modified).
- Git Hooks 6 Hooks are scripts git runs automatically at specific points in the workflow.
- Git Internals — Objects, Refs, the Real Storage 7 Underneath the porcelain commands is a content-addressed key-value store.
- Dangerous Commands and Safety 7 Git has commands that lose work permanently if used wrong.