Download our latest MNC Answers Application at Play Store. Download Now

Developer's 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 blow away all changes since last commit?

git checkout filename -- Correct

2. What is the GIT command to skip staging and directly commit the changes directly ?

git commit -a -m “message” -- Correct

3. What does the command git add. do?

Adds all the files to staging area -- Correct

4. GIT takes care of access control.

False -- Correct

5. What is the GIT command to see all changes since the last commit ?

git status -- Correct

6. It is a good practice to use present tense in commit messages.

True -- Correct

7. GIT is a ___

Distributed Version Control System -- Correct

8. After performing several commits, or cloning a repository with an existing commit history

git log -- Correct

9. What does the following command perform? Git reset –- soft HEAD^

Move commit to one before current head


10. When I run git fetch from my local repo it will update my local code?

False -- Correct

11. What is the git command to directly create and move to a new branch?

git checkout -b branchname -- Correct

12. What is the command to delete a branch in GIT?

git branch -d branchname -- Correct

13. What is the GIT command to create a branch?

git branch branchname -- Correct

14. What does the command git checkout branchname do?

Switches from main branch to the new branch -- Correct


15. What is a good practice to follow when you want to back up a local branch?

Push to remote repo -- Correct

16. What does the GIT command 'git remote prune origin' do?

Cleans up all remote stale repos -- Correct

17. What is the command to delete a remote branch in GIT?

git push origin : branchname -- Correct

18. A tag in GIT context is a

Reference to a specific commit -- Correct

19. What is the GIT command to see all the remote branches?

git branch -r -- Correct

20. If you want to list all the changes and know who made them at what time , what command should you use?

git which user -- Wrong

21. If you want to see the changes since last commit in a specific file, what command should you use?

git diff filename -- Correct

22. What is the output of the following code 'git log –- pretty = oneline'?

Display one commit per line with SHA in the beginning -- Correct

23. What is the GIT command to view the log with code level changes?

git log show code , git -l code -- Wrong

24. It is a good practice to include log files inside a repository.

False -- Correct

25. What does the command 'git log - - oneline – graph' do?

Visual representation of the branch merging into master -- Correct