Quiz – Git

/5

Basic

1 / 5

What all parameters are used to configure git in your local system. Choose the correct parameters from the following options?

2 / 5

Select the correct statements with respect to git diff and git diff --staged commands? (Select 2)

3 / 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?

4 / 5

You have setup your project using GIT in your local repository. Now you need to push your local repository code files to remote repository.

Among the following options, select the remote repositories which are compatible with GIT tool?

5 / 5

Among the following options, which all projects are supported by GIT?

Your score is

The average score is 52%

0%

Exit

/5

Repositories

1 / 5

You are using GIT in your project, and you have added the project files in GIT staging area. Now you need to commit all project files with commit message.

How can you add message and commit all project files?

2 / 5

Your team consist of four developers working on same project. You can see lot of commits done by your team in different-different repositories, you need to check commits done with your username. Select the correct git command for this activity?

3 / 5

You are working as a software developer in an IT company. Your company is using GIT as a version control tool for various projects. You have accidently added one file in your staging area. After some time, you realized that you have added unwanted file and you need to remove that file from the staging area. Which command you should run?

4 / 5

User needs to initialize new git repository in the local system. Choose the correct command that can be used to perform this task?

5 / 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.

 

  1. Clone GIT repository using SSH URL
  2. Add public key in GITHUB account
  3. Run ssh agent manually or on GIT Bash startup
  4. Generate Key Pairs using ssh keygen
  5. Add private key in ssh agent

Your score is

The average score is 52%

0%

Exit

/5

GIT Branching

1 / 5

You are trying to push master branch changes in to the remote repository and at the same time someone else from his team has pushed changes to the same branch and due to this you have encountered an error. Among the following options which error you are getting ?

2 / 5

You are working as a software developer and you are using GIT for managing your project code. You have performed multiple commits under the development branch and before pushing the code to the next level, you need to compare a few commit ID's to check the difference in each commit. Which command you should use from the following options?

3 / 5

The user wants to make radical changes in the teams project and want to make sure that his/her changes won't impact the rest of teams work. So where exactly user should implement these changes in ?

4 / 5

You have created different branches in your project and there were a number of commits done in each branch. You need to see the high level overview of the commit
history. Which command is helpful for this task?

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?

Your score is

The average score is 46%

0%

Exit

/5

GitLab

1 / 5

You are working on creating CI/CD pipeline using GitLab. You have started writing the CI/CD pipeline configuration into .gitlab-ci.yml file. Among the following options,
select which of the following is always a component of a .gitlab-ci.yml?

2 / 5

You are working as an GITLAB administrator. You need to take the backup of the GitLab repositories related to your projects. Select the command to perform this task?

3 / 5

Once you have generated SSH keys for authentication. Which key you need to add on your GitLab account?

4 / 5

From the following options, select the statements which are correct about GitLab? (select 2)

5 / 5

You need to execute GitLab CI/CD pipeline on GitLab runner. Among the following options, select the type of runner which can be used by any project?

Your score is

The average score is 35%

0%

Exit

/5

Bitbucket

1 / 5

You are using BITBUCKET to manage your project code. Among the following options, select the type of repository provided by BITBUCKET to users?

2 / 5

Among the following options, select the valid BITBUCKET CLOUD repository format?

3 / 5

You are using BITBUCKET for managing your static website code; you are looking to host your website webpage using BITBUCKET. Select the BITBUCKET feature that helps
in hosting your repository webpage?

4 / 5

You have created a 'development' branch in your local repository which you need to push to your BITBUCKET repository. Among the following options, select the
command to perform this task?

5 / 5

"BITBUCKET do not support IP whitelisting"
Select whether the above statement is correct or not?

Your score is

The average score is 37%

0%

Exit

/5

Git Merging

'Git merge' and 'Git rebase' commands are used to integrate different branches.
Git rebase - it is used to move the feature into the target branch, thus rebasing the feature branch into the target branch. Rebase provides linear commit history.
Git merge - it adds the new commit and preserves the commit history while merging the feature branch into the target branch. Merge provides non-linear commit history.

1 / 5

You are using GIT and GITHUB to manage your project code. You have created two branches named 'main' and 'developer'; now, you need to integrate the 'developer' branches
changes into the 'main' branch. Which command should you use from the following options? (select 2)

2 / 5

The user has merged code from his branch into the master branch, which landed into a merge conflict. Now user needs to compare both branches. Which command User should use to perform
this task?

3 / 5

Among the following options, select what the git commands do to the commit history?
git reset --hard HEAD~5
git merge --squash HEAD@{1}

4 / 5

You have been assigned a task to squash and merge all your commits in GITHUB. Among the following options, select the correct procedure to complete this task?

1. Login to your GITHUB account and select repository
2. Confirm the operation
3. Open PULL REQUEST that contains your commit history to be merged into master
4. On merge, select "Squash and Merge" from the dropdown

5 / 5

You are working inside GIT 'development' branch, and mistakenly, you have provided the wrong commit message for the last commit. Now you want to change the previous commit message,
which command should you use?

Your score is

The average score is 33%

0%

Exit