Quiz – Git Python JAVA AWS Git DevOps Menu Python JAVA AWS Git DevOps Leaderboard /5 Time is up!! Basic 1 / 5 You have successfully installed GIT in your local system and also initialized GIT in the project folder. Now you need to add the project files in the staging directory. Choose the command to perform this task? a. git rm b. git init c. git add d. git commit git add is used to add the files in the staging directory and then these files will be ready for commit. You can use git add <filename> for adding the files to staging directory. 2 / 5 Among the following options, select the programming language which was used to create GIT tool? a. JAVA b. PHP c. HTML d. C "C" programming language along with different shell scripts wrapped around those programs were used to create GIT tool. 3 / 5 Among the following options, which all projects are supported by GIT? a. All of the above b. JAVA project c. .NET project d. Android project GIT is an open-source tool which is most popular and widely used in software industry. It supports all major technology projects which includes .NET, JAVA, Android etc. 4 / 5 Select whether the following statement is correct or not with respect to GIT repository? "GIT repository is a file structure used by GIT to store the project files" a. False b. True GIT repository is a file structure which contains files, history, configurations related to projects. GIT is used to store the files on repository. There are two type of GIT repositories - local repository and remote repository. 5 / 5 Among the following options, select the correct option which helps in tracking the software developer’s contribution working as a team in a project? a. VCS b. CVS c. LFS d. DVF Version control system (VCS) keeps track of the software developer’s contribution working as a team in a project. VCS maintains the code history which helps developers to fix bugs, add new code and run test cases with confidence on current code version as their previous working copy can be easily restored anytime incase anything goes wrong. Your score is The average score is 25% 0% Exit /5 Time is up!! Repositories 1 / 5 You have run command: git remote -v on your GITBASH terminal. Among the following options what will be the expected output? a. List of git versions you have installed b. Inline text editor will open c. List of remote repositories you are connected to d. None of the above git remote -v command displays the list of remote repositories you are connected to. Remote repositories are mainly central repository i.e., GITHUB, GITLAB, BITBUCKET etc. 2 / 5 Which of the following tasks are achieved with the help of GIT clone command? a. Create working repository b. Create local copy of the repository c. All of the above d. Commit a new branch GIT clone command is used to clone remote to your local repository and thus you will have all the latest project files in your working directory. 3 / 5 You need to communicate your local repository with GITHUB or central repository. There should be a proper authentication that will allow your device to access GITHUB. Select the underlying authentication protocol used in the authentication process? a. HSS b. Remote c. SSH d. NFS SSH is also the only network-based protocol that you can easily read from and write to between your local repository with GITHUB or central repository. This helps in authentication the device which needs to access GITHUB or central repository. 4 / 5 User is working with GIT and want to clone GITHUB repository using SSH protocol. From the following options select the correct sequence to complete the setup. Clone GIT repository using SSH URL Add public key in GITHUB account Run ssh agent manually or on GIT Bash startup Generate Key Pairs using ssh keygen Add private key in ssh agent a. 4-1-5-3-2 b. 1-4-3-2-5 c. 4-3-2-5-1 d. 4-2-3-5-1 Steps to clone GITHUB repository using SSH protocol: Generate Key Pairs using ssh keygen Add public key in GITHUB account Run ssh agent manually or on GIT Bash startup Add private key in ssh agent Clone GIT repository using SSH URL 5 / 5 You have recently created a new file named as 'hello.txt' in your local repository. Among the following options, select the command which you can use to add 'hello.txt' file to the git staging area so that you can commit it? a. git add -m hello.txt b. git add -a hello.txt c. git add hello.txt d. git add new file git add is used to add the files in the staging directory and then these files will be ready for commit. You can use git add hello.txt for adding the file to staging directory. Your score is The average score is 25% 0% Exit /5 Time is up!! GIT Branching 1 / 5 You have created two branches named as 'main' and 'developer'. Now you need to modify the name of the 'developer' branch name to 'development'. Select the correct GIT command to perform this task? a. git branch -m developer development b. git branch -n developer development c. git branch -m development developer d. git branch -n development developer git branch -m is the command used to modify the branch name. In this case you will use command git branch -m developer development. 2 / 5 You have created two branches named as "master" and "developer". You are currently working in "developer" branch and now you need to switch to "master" branch to check few code files. Select the command to perform this operation? a. git branch master b. git checkout master c. git checkout developer d. git branch -a git checkout is used to switch between different branches in your local system. In this case you need to run command: git checkout master 3 / 5 You have recently joined the software development team, you need to import the latest code to your local repository from the master branch of the remote repository. Select the command to complete this task? a. git push b. git pull origin master c. git pull d. git push origin master git pull origin is used to pull the files from central or remote repository to local repository. In this case you need to run command: git pull origin master 4 / 5 You have recently performed commit operation on master branch under your local repository, you need to check the details of the recent commit. How to check that? a. git -show <commit id> b. git -show <commit id> c. git show <commit id> d. git -s <commit id> git show is the command which is used to display details of a particular commit. 5 / 5 You have been given a task to create a branch named as "master" and then import the code from GITHUB repository. Choose the command to create a branch? a. git branch master b. git branch -n master c. git branch "master" d. git branch new git branch is used to create a new branch. To create master branch you need to run command git branch master Your score is The average score is 0% 0% Exit