About GIT

Following are some of the multiple choice questions on the GIT with answers that will help the students in developing their knowledge.

GIT MCQ

1. Which is Distributed version control system?

  • cvs
  • perforce
  • svn
  • Git

2. After you add a file, it becomes

  • Committed
  • Modified
  • Staged
  • Untracked

3. Which of the following is true you when you use the following command?git add -A

  • All new and updated files are staged
  • Files are staged in alphabetical order.
  • All new files are staged
  • Only updated files are staged

4. What command lets you create a connection between a local and remote repository?

  • git remote add origin
  • git remote add new
  • git remote new origin
  • git remote origin

5. .......... is equivalent to fetch and merge

  • pull
  • syncronize
  • push
  • fetch

6. Arranging customers names in ascending order is an example of,

  • process
  • information processing
  • Information
  • data

7. How do you supply a commit message to a commit?

  • Git message "My first commit"
  • Git add "My first commit"
  • Git commit "My first commit"
  • Git commit -m "I'm coding!"

8. Which two configuration properties does the tool expect to be configured after installing Git and prior to issuing the first commit?

  • email address and password
  • username and password
  • username and IP address
  • username and email address

9. What's a shortcut to staging all the changes you have?

  • Git commit add .
  • Git commit .
  • Git add .
  • Git stage -a

10. Which of the following commands is used in switching between branches?

  • Git branch
  • Git checkout
  • Git switch
  • Git merge

11. Which of the following commands will allow you to change branches?

  • git checkout
  • git clone
  • git add
  • git commit

12. Which Command is used to show limited number of commits?

  • git fetch <remote>
  • git log -n <limit>
  • git config <limit>
  • git status

13. Git reset --hard used to?

  • uncommitted the changes, unstage the changes
  • uncommitted the changes
  • uncommitted the changes, unstage the changes, delete the changes
  • Unstage the changes

14. What will the following command print to the Terminal?git remote -v

  • A list of remote repositories you are connected to
  • The current git version you're running
  • An inline editor for modifying remote repositories
  • The last 5 git versions you've installed

15. What is the area where uncommitted changes are temporarily held after adding?

  • Staging Area
  • Unstaging Area

16. Command to check the created, modified, deleted files in gitbash before Commit?

  • git show
  • git log
  • git status
  • all of the above

17. Which command is useful for getting a high-level overview of the project history?

  • git log --oneline
  • git reset --hard
  • git log --author="<pattern>"
  • git rebase <base>

18. Which of the following is not a Git configuration scope?

  • Local
  • User
  • System
  • Global

19. Which vendor acquired GitHub for $7.5 billion in June 2018?

  • Oracle
  • Microsoft
  • IBM
  • Google

20. Which of the following commands will merge branch-a into the master branch?

  • git merge master and git checkout branch-a
  • git checkout branch-a and git merge master
  • git checkout master and git merge branch-a
  • git merge branch-a and git checkout master

21. Git commit command use to

  • push changes from local repo to central repo
  • stage changes
  • push changes from staging area to local repo
  • all of them

22. Which command should you use to initialize a new git repository?

  • Git bash
  • Git install
  • Git init
  • Git start

23. Which file can you configure to ensure that certain files are never committed to the local Git repository?

  • Ignore.git
  • .gitignore
  • gitignore.txt
  • git.ignore

24. You can type git status at any point while in a git controlled directory to check the status of your files?

  • True
  • False

25. Which is the following is the default text editor for the Bash shell with a Windows-based Git install?

  • Bash
  • Vim
  • Emacs
  • Notepad++

26. What is the default text editor for the Bash shell with a Windows-based Git install?

  • Emacs
  • Vim
  • Notepad++
  • Bash

27. What command removes untracked files from your working directory.

  • git commit
  • git clean -f <path>
  • git clean
  • git reset

28. What is the incorrect statement regarding information?

  • Processed information are taken to make decisions
  • Cost effectiveness is a feature of a quality information
  • Value of the information will be increased as time passes
  • All information is not suitable for decision making

29. Which programming language was used to create Git?

  • C
  • HTML
  • PHP
  • C++

30. Command use to connect remote repo with local repo

  • git remote add
  • git init
  • git connect repo
  • git configure

31. Which one of them is incorrect command

  • git add Test.txt
  • git pull origin master
  • git push origin master
  • None

32. Which of the following is the correct way to initialize a new Git repository?

  • git add .
  • git init
  • git commit
  • none of the above

33. How would you commit this with the message "adding new authors to index"?

  • git commit -m "adding new authors to index"
  • git commit "adding new authors to index"
  • git commit .
  • none of the above

34. What are the different options for git reset?

  • --hard
  • --soft
  • --mixed
  • All of above

35. Which of the following commands will create a new branch?

  • git checkout new-branch
  • git checkout -b new-branch
  • git clone new-branch
  • git create-branch new-branch

36. Which of the following is one of Git's powerful features?

  • Rooting
  • Leafing
  • Branching
  • Planting

37. Command to add particular file changes to staging area from working directory?

  • git pull
  • git add .
  • git add filename
  • git commit -m

38. Which of the following commands will stage your entire directory and every non-empty directory inside your current directory?

  • git status all
  • git add .
  • git commit all
  • None of these

39. How do you check the state of your local git repository since your last commit?

  • git check
  • git diff
  • git commit
  • git status

40. To make a new git branch, the git command is?

  • git branch
  • git -b
  • git new branch
  • git checkout branch

41. Ramani put two pens and a big eraser into the pencil case. The underline phrase of this sentence indicates,

  • A qualitative data and quantitative data
  • A qualitative data
  • A quantitative data and qualitative data
  • An Information

42. A pen shaped device which can sense light, and is used to point at spots on a video screen.

  • Mouse
  • Light Pen
  • Joystick
  • Plotter

43. Authentication uniquely binds your machine to your GitHub, Bitbucket, or any code hosting service. This allows the devices you add to get access to your repositories.

  • SSS
  • SHH
  • SSH
  • HSS

44. Checks out a branch from repository into the working directory.

  • git init
  • git checkout
  • git add
  • git commit

45. Git command if I want to commit my changes about "Initial commit"

  • git commit -m "Initial commit"
  • git commit -msg "Initial commit"

46. ............. command is to create git branch

  • git checkout <branchName>
  • git create-branch <branchName>
  • git branch <branchName>
  • git -b <branchName>

47. Git branch -b <branchName>, -b indicates

  • branch name you want to jump to
  • branch needs to get created
  • branch needs to be fetched from central repo
  • nothing

48. Git commit -m < ? >, ? is for

  • file name to be commited
  • comment
  • repo url
  • None

49. Who is attributed with inventing Git?

  • Junio C. Hamano
  • James Gosling
  • Kohsuke Kawaguchi
  • Linus Torvalds

50. What do you call a system the records the project code's changes over time?

  • Repository System
  • Code Change System
  • Version Control System
  • none of the above

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.