Professional Documents
Culture Documents
More On Git Q&A
More On Git Q&A
What is the git command to see the last 3 commits in one line ?
git log -–oneline -3 -- Correct
What is the significance of using –index in the git stash pop - - index command ?
To pull the staged changes -- Correct
What command should I use to retrieve my files that have been temporarily stashed ?
git stash pop – index -- Correct
what is the command to view all the commits made by a specific person (Jim)?
git log -–author=”Jim” -- Correct
What is the git command to see all the commit since 1st January 2017 ?
git log -–since=”2017-01-01”
A good commit message can have have more then 100 characters.
False -- Correct
What is the output of the command git reset –hard HEAD ~3?
throw away the last 3 commits -- Correct
I want to take all the changes I made in the staging to my working directory , what
command should I use to do this operation ?
git reset HEAD -- Correct
What is the command to pick a commit from a specific branch and move it to another
branch ?
git cherrypick -- Correct
Which command helps you track the revisions of your revisions in git ?
git reflog -- Correct
I have made a commit and discarded it . I can still retrieve that commit using git
reflog.
True -- Correct
git reflog track the commits that are made and the commits that are discarded .
True -- Correct
What is the git command to move branch pointer to different commit without checkout
?
git update-ref -- Correct
git reflog –verbose will print extra information on the screen.
True -- Correct