Q: 1
What do you use to update the Git history of the local file you are working on?
Options
Discussion
Option B, Saw this trap before, some pick A by mistake but commit actually updates the Git history.
C makes sense if you think about prepping changes for history, since staging is needed before commit anyway. I've seen folks pick C on practice because "stage" feels like part of updating the local file's status.
Yeah, Commit is the right move here (B). Official guide and hands-on labs both cover these Git basics pretty well if you want extra practice.
B
Saw a similar question in the official guide and practice tests. Worth checking both for more Git commands.
B
Maybe C, since staging adds it to the index but doesn't actually write to history unless you commit. Nitpicking the wording here.
B
B tbh, had a similar question in my practice set and commit was the right call.
C or D? Staging still makes sense if you look at history as a prep step, and check out does change what’s tracked locally. Which one is really updating the actual file history though?
C or D for me. I figure if you want to update your local repo, staging (C) prepares the file and check out (D) switches branches so one of those has to impact history, right? Not totally sure here.
Be respectful. No spam.