More on Git MCQs Solution | TCS Fresco Play


More on Git MCQs Solution  |  TCS Fresco Play

Disclaimer: The primary purpose of providing this solution is to assist and support anyone who are unable to complete these courses due to a technical issue or a lack of expertise. This website's information or data are solely for the purpose of knowledge and education.

Make an effort to understand these solutions and apply them to your Hands-On difficulties. (It is not advisable that copy and paste these solutions).

All Question of the MCQs Present Below for Ease Use Ctrl + F with the question name to find the Question. All the Best!

1. What is the git command to see the last 3 commits in one line ?

git log -–oneline -3  --  Correct

2. How do I view all the commits for the last 2 weeks ?

git log -–since=”2 weeks ago”  --  Correct

3. What is the significance of using –index in the git stash pop - - index command ?

To pull the staged changes  --  Correct

4. What is the command to temporarily store uncommitted ?

git stash  --  Correct

5. What command should I use to retrieve my files that have been temporarily stashed ?

git stash pop – index  --  Correct

6. what is the command to view all the commits made by a specific person (Jim)?

git log -–author=”Jim”  --  Correct

7. What is the git command to see all the commit since 1st January 2017 ?

git log -–since=”2017-01-01”

8. A good commit message can have have more then 100 characters.

False  --  Correct

9. What is the output of the command git reset -–soft HEAD ~5 ?

move the last 5 commits as 1 into the staging area  --  Correct

10. What is the output of the command git reset –hard HEAD ~3?

throw away the last 3 commits  --  Correct

11. 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

12. A good commit message should be descriptive and specific

True  --  Correct

13. What is the command to amend an incorrect commit message ?

git commit –amend -m “correct message”  --  Correct

14. What is the command to pick a commit from a specific branch and move it to another branch ?

git cherrypick  --  Correct

15. Which command helps you track the revisions of your revisions in git ?

git reflog  --  Correct

16. I have made a commit and discarded it . I can still retrieve that commit using git reflog.

True  --  Correct

17. git reflog track the commits that are made and the commits that are discarded .

True  --  Correct

18. What is the git command to move branch pointer to different commit without checkout ?

git update-ref  --  Correct

19. git reflog –verbose will print extra information on the screen.

True  --  Correct

20. git bisect is used to identify a commit that has introduced a bug .

True  --  Correct

If you have any queries, please feel free to ask on the comment section.

If you want MCQs and Hands-On solutions for any courses, Please feel free to ask on the comment section too.

Please share and support our page!

Post a Comment

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !

Join Telegram Channel

Join MNCAnswers To Get Instant Updates

Join Telegram Channel