Quiz: What does the command 'git checkout -b feature/auth' execute in a Git repository?
git checkout -b (or modern git switch -c ) creates and switches to a new branch atomically.
Find tutorials, system documentation, dynamic pages, and interactive quizzes in one place.
git checkout -b (or modern git switch -c ) creates and switches to a new branch atomically.
git reset --soft moves the HEAD pointer backward while keeping all file modifications staged in the index for recommitting.
The reflog keeps a chronological journal of all HEAD pointer movements, enabling rescue of orphaned commits or lost branches.
git rebase rewrites branch commits on top of another base commit to maintain a clean linear commit graph.
git commit --amend replaces the most recent commit on the active branch with a new commit incorporating staged changes.
A detached HEAD occurs when you checkout a specific commit hash or tag rather than a named branch pointer.
git diff --staged displays the exact code changes that have been added to the staging index ready for the next commit.
The Index (staging area) is a binary cache where proposed file modifications are assembled before creating a commit.