A Git challenge: Which version ends up in the repo? - Vidnexa
VidNexa
Up next
 
00:00 / 00:00
QualityAutochevron_right
Playback speedchevron_right
Audio trackchevron_right
Chapterschevron_right
Autoplay On
Loop Off
Sticky player Off
Sleep timerOffchevron_right
Subtitles/CC On
Stats for nerds
Sleep timer ended
⏪ 10s
⏩ 10s

A Git challenge: Which version ends up in the repo?

2.3K views • 4 months ago • Documentary
18 Comments
@NagaArts
@@NagaArts 4 months ago
V2. it is staged but v3 isn't
@EasinArafat-it1zi
@@EasinArafat-it1zi 4 months ago
Obviously the correct answer v2
@jamescampbell7906
@@jamescampbell7906 5 months ago
v2 - v3 never staged
@GoogleDevelopers
@@GoogleDevelopers 5 months ago
Result: v2 Why: The second git add stages the file at v2. The final change to v3 is not staged.
@junama
@@junama 5 months ago
V2 is added to LOCAL repo, not pushed 😅
@DeCesareFamily
@@DeCesareFamily 5 months ago
v2 . Didn't add v3
@FSK2
@@FSK2 5 months ago
As far as I am concerned. I just do vibe coding but just for the heck of it V3
@AUTEMA1
@@AUTEMA1 5 months ago
V2
@CharlotteLopez-n3i
@@CharlotteLopez-n3i 5 months ago
v3. Last add wins. Git snapshots what's staged at commit time. Classic gotcha.
@burstflick45
@@burstflick45 5 months ago
V2 cause v3 has not been added before commit
@avinash.singh1
@@avinash.singh1 5 months ago
It's V2 that gets committed because V2 was staged using "add" command before "commit" command was executed.
@pham-duq3763
@@pham-duq3763 5 months ago
V2 for sure. V3 is in working directory and v2 is in staging area
@GoogleDevelopers
@@GoogleDevelopers 5 months ago
Hint: Ask yourself: does git commit what is currently staged, or the history of how the file changed?
@handisaputra_lin
@@handisaputra_lin 5 months ago
Damn! It is the most easy question 😅 Anything that isn't staged can't be commit. I feel shy 😂😂😂
@iamkarna
@@iamkarna 5 months ago
V2. V3 not added before the commit.
@dragonhaert_
@@dragonhaert_ 5 months ago
B. v2<br>V3 is an unstaged (not added) change prior to the commit. Adding after v2 overwrites the staged change of v1 cuz the contents of config.txt changed
@romualdbarbe1070
@@romualdbarbe1070 5 months ago
V2 because V3 has not been added
@deep_thinker_jittu
@@deep_thinker_jittu 5 months ago
V3