0% found this document useful (0 votes)
10 views

Version_Control_with_GIT_Guide_1730081845

Uploaded by

arunpasham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Version_Control_with_GIT_Guide_1730081845

Uploaded by

arunpasham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 112

Version Control with GIT

Copyright IntelliPaat, All rights reserved


Agenda
WHAT IS VERSION TYPES OF INTRODUCTION TO
01 CONTROL? 02 VERSION 03 GIT
CONTROL SYSTEM

COMMON GIT
04 GIT LIFECYCLE 05 COMMANDS
06 MERGING IN GIT

RESOLVING
07 MERGE
08 GIT WORKFLOW
CONFLICTS

Copyright IntelliPaat, All rights reserved


What is Version
Control?

Copyright IntelliPaat, All rights reserved


What is Version Control?

Version control is a system that records/manages changes to documents,


computer programs etc over time. It helps us tracking changes when multiple
people work on the same project

Copyright IntelliPaat, All rights reserved


Problems before Version Control

Imagine, Developer A creates a software, and starts a company with this software.

Developer A Software

Copyright IntelliPaat, All rights reserved


Problems before Version Control

As the company grows, Developer A hires more people to enhance the features of this
software. Developer A shares the source code copy with each one of them to work on

Vers ion 1

Developer B

Vers ion 1

Vers ion 1
Developer A Vers ion 1 Developer C Software

Developer D
Copyright IntelliPaat, All rights reserved
Problems before Version Control

Developer B, enhances the software with a feature and submits it to Developer A

Vers ion 2

Vers ion 1
Developer B

Vers ion 1
Vers ion 1
Developer C Developer A Software

Vers ion 1 Developer D


Copyright IntelliPaat, All rights reserved
Problems before Version Control

Developer A, verifies the changes, and if all looks well, simply replaces the code of
the main software

Vers ion 1
Developer B

Vers ion 2

Vers ion 1
Developer C Developer A Software

Vers ion 1 Developer D


Copyright IntelliPaat, All rights reserved
Problems before Version Control

Now, the problem starts here, Developer C also finished his work, and submits the
changes to Developer A. But, Developer C worked on the code of Version 1.

Vers ion 1
Developer B

Vers ion 2
Vers ion 3
Vers ion 1
Developer C Developer A Software

Vers ion 1 Developer D


Copyright IntelliPaat, All rights reserved
Problems before Version Control

Developer A verifies the features, takes the code changes and manually integrates
them with Version 2 code

Vers ion 1
Developer B

Vers ion 3

Vers ion 1
Developer C Developer A Software

Vers ion 1 Developer D


Copyright IntelliPaat, All rights reserved
Problems before Version Control

Similarly when Developer C is done with his work, submits the work to Developer A.
Developer A verifies it, manually integrates the changes with Version 3

Vers ion 1
Developer B

Vers ion 4

Vers ion 1
Developer C Developer A Software

Vers ion 4

Vers ion 1 Developer D


Copyright IntelliPaat, All rights reserved
Problems before Version Control

Versioning was Manual

Team Collaboration was a time


consuming and hectic task

No easy access to previous versions

Multiple Version took a lot of space

Copyright IntelliPaat, All rights reserved


Advantages of Version Control

Versioning is Automatic

Team Collaboration is simple

Easy Access to previous Versions

Only modified code is stored across


different versions, hence saves storage

Copyright IntelliPaat, All rights reserved


Types of Version
Control System

Copyright IntelliPaat, All rights reserved


Types of Version Control System
Version Control System

Central VCS Distributed VCS

Remote Repo Remote Repo

Local Repo Local Repo Local Repo

Copyright IntelliPaat, All rights reserved


Centralized Version Control System

Centralized Version Control System has one single


Remote Repo copy of code in the central server

Developers will have to “commit” their changes in the


code to this central server

“Committing” a change simply means recording the


change in the central system

Centralized VCS

Copyright IntelliPaat, All rights reserved


Distributed Version Control System

In Distributed VCS, one does not necessarily rely on a


Remote Repo central server to store all the versions of a project’s
file

Every developer “clones” a copy of the main


repository on their local system
Local Repo Local Repo Local Repo
This also copies, all the past versions of the code on
the local system too

Therefore, the developer need not be connected to


the internet to work on the code
Distributed VCS

Copyright IntelliPaat, All rights reserved


Difference between DVCS and CVCS
Distributed VCS Centralized VCS

Everything except pushing and pulling can Needs a dedicated internet connection
be done without Internet Connection for every operation

Every Developer has full version history on Developers just have the working copy
local hard drive and no version history on their local
drive
Committing and retrieving action is faster
since data is on local drive Committing and retrieving action is
slower since it happens on the internet
Not Good for storing large files which are
binary in nature, this would increase the Good for storing large files, since version
repo size at every commit history is not downloaded

If a project has a lot of commits, Not dependent on the number of


downloading them may take a lot of time commits

Copyright IntelliPaat, All rights reserved


Examples of CVCS

Copyright IntelliPaat, All rights reserved


What is SVN?

Apache Subversion is a software versioning and


revision control system distributed as open source
under the Apache License

It is based on Centralized Version Control Architecture

The development started in 2000, and this version


finally became available in 2004

It is still constantly being developed by a small but


active open source community

Copyright IntelliPaat, All rights reserved


Disadvantages of SVN

Constantly needs an Internet Connection for any


operation

Version History is not downloaded or maintained on


the local system

Slower than DVCS, since requires internet for every


operation

Conflicts have to be resolved manually

Copyright IntelliPaat, All rights reserved


Examples of DVCS

Copyright IntelliPaat, All rights reserved


Introduction to Git

Copyright IntelliPaat, All rights reserved


Why Git?

Git is the most popular tool among all the DVCS tools.

Copyright IntelliPaat, All rights reserved


What is Git?

Git is a version-control system for tracking changes in computer files and coordinating work on those
files among multiple people. It is primarily used for source-code management in software
development, but it can be used to keep track of changes in any set of files.

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Following are the lifecycle stages of files in Git

Working Staging
Commit
Directory Area

Copyright IntelliPaat, All rights reserved


Git Lifecycle

The place where your project resides in your local disk


Working Directory
This project may or may not be tracked by git

Staging Area In either case, the directory is called the working directory

The project can be tracked by git, by using the command git init
Commit
By doing git init, it automatically creates a hidden .git folder

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Once we are in the working directory, we have to specify which files


Working Directory are to be tracked by git

We do not specify all files to be tracked in git, because some files


Staging Area could be temporary data which is being generated while execution

To add files in the staging area, we use the command git add

Commit

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Once the files are selected and are ready in the staging area, they can
now be saved in repository
Working Directory

Saving a file in the repository of git is known as doing a commit

Staging Area
When we commit a repository in git, the commit is identified by a
commit id

Commit The command for initializing this process is git commit –m “message”

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Program Workspace Git initialized


Working Directory

Staged files in the


working directory for
commit

Files committed to
git repository

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Program Workspace Git initialized


Working Directory

Staged files in the


working directory for
commit

Files committed to
git repository

How do we collaborate with the team?

Copyright IntelliPaat, All rights reserved


Git Lifecycle

Program Workspace Git initialized


Working Directory

Staged files in the


working directory for
commit

GitHub Files committed to


Team
git repository
Collaboration

Once the files are committed, they can be pushed to a remote


repository such as GitHub
Copyright IntelliPaat, All rights reserved
How does Git work?
Any project which is saved on git, is saved using a commit. The commit is
identified using a commit ID.

Commit ID: 00001

Project Folder

Copyright IntelliPaat, All rights reserved


How does Git work?
When we edit the project or add any new functionality, the new code is again
committed to git, a new commit ID is assigned to this modified project. The older
code is stored by git, and will be accessible by it’s assigned Commit ID

Commit ID: 00002

Commit ID: 00001


Project Folder

Copyright IntelliPaat, All rights reserved


How does Git work?
All these commits are bound to a branch. Any new commits made will be added
to this branch. A branch always points to the latest commit. The pointer to the
latest commit is known as HEAD

HEAD

Commit ID: 00001 Commit ID: 00002

Project Folder

Copyright IntelliPaat, All rights reserved


How does Git work?
The default branch in a git repository is called the Master Branch

Master Branch

Commit ID: 00001 Commit ID: 00002

Project Folder

Copyright IntelliPaat, All rights reserved


How does Git work?
The default branch in a git repository is called the Master Branch

Master Branch

Commit ID: 00001 Commit ID: 00002

Project Folder But, why do we need a branch?

Copyright IntelliPaat, All rights reserved


How does Git work?
Say, a developer has been assigned enhance this code by adding Feature A. The code is assigned to this
developer in a separate branch “Feature A”. This is done, so that master contains only the code which is
finished, finalized and is on production

Master Branch
Commi t ID: Commi t ID:
00001 00002

Feature A Branch
Commi t ID:
00002

Copyright IntelliPaat, All rights reserved


How does Git work?
Therefore, no matter how many commits are made by this developer on Feature A branch, it will not
affect the Master Branch.

Master Branch
Commi t ID: Commi t ID:
00001 00002

Feature A Branch
Commi t ID: Commi t ID:
00002 00004

Copyright IntelliPaat, All rights reserved


How does Git work?
Once the code is finished, tested and ready we can merge the Feature A branch, with the master branch
and now the code is available on the production servers as well

Master Branch
Commi t ID: Commi t ID: Commi t ID:
00001 00002 00004

Feature A Branch
Commi t ID: Commi t ID:
00002 00004

Copyright IntelliPaat, All rights reserved


Common Git Commands

Copyright IntelliPaat, All rights reserved


Common Git Commands
You can do the following tasks, when working with git. Let us explore the commands related
to each of these tasks

Creating Repository Making Changes

Parallel Development Syncing Repositories

Copyright IntelliPaat, All rights reserved


Common Git Commands – git init
You can create a repository using the command git init. Navigate to your
project folder and enter the command git init to initialize a git repository
for your project on the local system
Creating Repository

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git status
Once the directory has been initialized you can check the status of the
files, whether they are being tracked by git or not, using the command
git status
Creating Repository

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git add
Since no files are being tracked right now, let us now stage these files.
For that, enter the command git add. If we want to track all the files in
the project folder, we can type the command,
Creating Repository
git add .

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git commit
Once the files or changes have been staged, we are ready to commit
them in our repository. We can commit the files using the command
git commit –m “custom message”
Creating Repository

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git remote
Once everything is ready on our local, we can start pushing our changes
to the remote repository. Copy your repository link and paste it in the
command
Creating Repository
git remote add origin “<URL to repository>”

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git push
To push the changes to your repository, enter the command
git push origin <branch-name> and hit enter. In our case the branch is master, hence
git push origin master
Creating Repository This command will then prompt for username and password, enter the values and
hit enter.

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git push
Your local repository is now synced with the remote repository on
github
Creating Repository

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git clone
Similarly, if we want to download the remote repository to our local system, we can
use the command:
git clone <URL>
Creating Repository This command will create a folder with the repository name, and download all the
contents of the repository inside this folder. In our example, repository contents
were downloaded into the ”devops” folder.

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git pull
The git pull command is also used for pulling the latest changes from the repository,
unlike git clone, this command can only work inside an initialized git repository. This
command is used when you are already working in the cloned repository, and want
Creating Repository to pull the latest changes, that others might have pushed to the remote repository

git pull <URL of link>

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git branch
Until now, we saw how you can work on git. But now imagine, multiple developers
working on the same project or repository. To handle the workspace of multiple
developers, we use branches. To create a branch from an existing branch, we type
Creating Repository
git branch <name-of-new-branch>

Similarly, to delete a branch use the command


Making Changes
git branch –D <branch name>

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git checkout
To switch to the new branch, we type the command

git checkout <branch-name>


Creating Repository

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git log
Want to check the log for every commit detail in your repository?
You can accomplish that using the command

git log

Copyright IntelliPaat, All rights reserved


Common Git Commands – git stash
Want to save your work without committing the code? Git has got you covered.
This can be helpful when you want to switch branches, but do not want to save
your work to your git repository. To stash your staged files without committing just
Creating Repository type in git stash. If you want to stash your untracked files as well, type git stash –u.

Once you are back and want to retrieve working, type in git stash pop

Making Changes

Syncing Repositories

Parallel Development

Copyright IntelliPaat, All rights reserved


Common Git Commands – git revert
This command helps you in reverting a commit, to a previous version

git revert <commit-id>

<commit-id> can be obtained from the output of git log

Copyright IntelliPaat, All rights reserved


Common Git Commands – git diff
This command helps us in checking the differences between two versions of a file

git diff <commit-id of version x> <commit-id of version y>

<commit-id> can be obtained from the output of git log

Copyright IntelliPaat, All rights reserved


Merging Branches

Copyright IntelliPaat, All rights reserved


Merging Branches

Once the developer has finished his code/feature on his branch, the code will have to
be combined with the master branch. This can be done using two ways:

Git Merge

Git Rebase

Copyright IntelliPaat, All rights reserved


Merging Branches – git merge

If you want to apply changes from one branch


to another branch, one can use merge
command

Should be used on remote branches, since


Git Merge history does not change

Creates a new commit, which is a merger of


the two branches
Git Rebase
Syntax: git merge <source-branch>

Copyright IntelliPaat, All rights reserved


Merging Branches – git merge
Imagine, you have a Master branch and a Feature A branch.
The developer has finished his/her work in the feature A
branch and wants to merge his work in the master.

Git Merge Master

Feature A
Git Rebase

Copyright IntelliPaat, All rights reserved


Merging Branches – git merge
If he is using git merge, a new commit will be created, which
will have the changes of Feature A and Master branch
combined.

Any new commits to the Feature branch will be isolated from


the master branch
Git Merge

Master

Git Rebase

Feature A

Copyright IntelliPaat, All rights reserved


Merging Branches – git merge
This command can be executed using the syntax

git merge <source-branch-name>

Git Merge

Git Rebase

Copyright IntelliPaat, All rights reserved


Merging Branches – git merge
The history of the branch will look something like this, if we are using
git merge

Git Merge

Git Rebase

Copyright IntelliPaat, All rights reserved


Merging Branches – git merge

This is an alternative to git merge command

Should be used on local branches, since


history does change and will be confusing for
other team members
Git Merge
Does not create any new commit, and results
in a cleaner history

The history is based on common commit of


Git Rebase the two branches (base)

The destination’s branch commit is pulled


from it’s “base” and “rebased” on to the latest
commit on the source branch

Copyright IntelliPaat, All rights reserved


Merging Branches – git rebase

Imagine, you have a Master branch and a test branch(local


branch)

The developer has finished his/her work in the test branch

Git Merge But the master moved forward, while the code was being
developed

Code being developed is related to the new commit added in


master
Git Rebase

Master

Test

Copyright IntelliPaat, All rights reserved


Merging Branches – git rebase

Therefore you want all the changes from master in feature.

Since, it is a local branch, you would want a cleaner or linear


history, you decide to use git rebase
Git Merge
Syntax: git rebase <source branch>

Git Rebase

Master

Test

Copyright IntelliPaat, All rights reserved


Merging Branches – git rebase

This is how the output looks like:

Git Merge

Git Rebase

Copyright IntelliPaat, All rights reserved


Merging Branches – git rebase
This is how the commits look like, after a rebase. The commit
was “rebased” from the first commit to the next commit

Test

Git Merge
Test

And looking at the history we can clearly see, it’s a clean


Git Rebase linear history, without any branches

Copyright IntelliPaat, All rights reserved


Merge Conflicts

Copyright IntelliPaat, All rights reserved


Merge Conflicts
Merge conflicts occur when we try to merge two branches, which have the same file updated by two different
developers. Let’s understand it using a scenario:

Master Branch
Commi t ID: Commi t ID:
00001 00002

Feature A Branch
Imagine, two developers have been given
the task of adding features to a code,
they both have to add their code in
functions.c file
Feature B Branch

Copyright IntelliPaat, All rights reserved


Merge Conflicts
The functions.c file looks something like this as of now,

Main()
{
Function1()
{
//Initial Code
}

function.c

Copyright IntelliPaat, All rights reserved


Merge Conflicts

Developer A finished his code, and pushes the changes to the master branch

Master Branch
Commi t ID: Commi t ID:
00001 00002

Feature A Branch
Devel oper A

Feature B Branch
Devel oper B

Copyright IntelliPaat, All rights reserved


Merge Conflicts

Main() Main()
{ {
Function1() Function1()
{ {
//Initial Code //Initial Code
} }
Function2() Function3()
{ {
//Developer A Code //Developer B Code
} }

} }
function.c function.c

After the Developer A changes his code After the Developer B changes his
and pushes it to master, the code on the code, the code on Feature B branch
Master branch looks something like this looks something like this

Copyright IntelliPaat, All rights reserved


Merge Conflicts

Comparing the two code, we can see Feature A Branch is missing Developer A code. Therefore if
we merge Feature A Branch with Master Branch, logically Developer A changes will disappear

Master Branch Feature A Branch

Main() Main()
{ {
Function1() Function1()
{ {
//Initial Code //Initial Code
} }
Function2() Function3()
{ {
//Developer A Code //Developer B Code
} }

} }

function.c function.c

Copyright IntelliPaat, All rights reserved


Merge Conflicts
To solve this, git has a fail safe. If the Master branch has been moved forward in commits, compared to the branch
which is being merged, it creates a conflict.

Master Branch
Commi t ID: Commi t ID:
00001 00002
Merge Conflict

Developer B finished his code, and Feature B Branch


pushes the changes to the master
branch. The merge is unsuccessful with a Devel oper B

conflict message

Copyright IntelliPaat, All rights reserved


Hands-on – Simulating a Merge
Conflict
Copyright IntelliPaat, All rights reserved
Merge Conflicts

This is the message, you will get when you merge a branch, which has a conflicting file

Merge Conflict Message

Copyright IntelliPaat, All rights reserved


How to resolve Merge Conflicts?

Copyright IntelliPaat, All rights reserved


How to resolve Merge Conflicts?
Once we have identified, there is a merge conflict we should go ahead and use the command

git mergetool

Hit enter after this prompt, and then you should enter the merge tool

Copyright IntelliPaat, All rights reserved


How to resolve Merge Conflicts?
The merge tool looks something like this, the top leftmost column is for Dev1 Branch changes, the centre
column is for the original code i.e the master’s code before any commits, and the right most column are
the dev 2 branch changes. The area below these columns is where we make the changes, this is the
place where we have the merged code.
Original Master
Branch

Dev 1 Branch Changes Dev 2 Branch Changes

Main file, where


changes are manually
merged
Copyright IntelliPaat, All rights reserved
How to resolve Merge Conflicts?
Once you have resolved the changes, save the file using “:wq”, vim command for save and exit. Do the
same for all the files

Copyright IntelliPaat, All rights reserved


How to resolve Merge Conflicts?
After this step, see the status of you local repository you can see the file in conflict has been modified
successfully and is merged with master. This modified file can now be committed to the master

There will be some


other files which have
been created, these
files are a copy of the
original files which
have been changed,
you can delete them,
if not needed.

Copyright IntelliPaat, All rights reserved


How to resolve Merge Conflicts?
Finally commit your changes, to the branch and then push
it to the remote repository

Copyright IntelliPaat, All rights reserved


Collaboration in GitHub

Copyright IntelliPaat, All rights reserved


Collaboration in GitHub

Collaboration in GitHub is very important aspect of Software Development. It enables


developers to parallelly work on the same project

Copyright IntelliPaat, All rights reserved


Process of Collaboration in GitHub

1 Add collaborators to your repository

2 Protect the branches, which need restricted access

Copyright IntelliPaat, All rights reserved


Process of Collaboration in GitHub

Collaborators are the people who will be working on your project. To


add contributors to your repository, use the steps in the following
image:

Collaborators

Protecting Branches

Copyright IntelliPaat, All rights reserved


Process of Collaboration in GitHub

Using this feature, you can restrict access on how commits are made to
the branches you specify

Collaborators

Protecting Branches

Copyright IntelliPaat, All rights reserved


Hands-on: Collaborating in GitHub

Copyright IntelliPaat, All rights reserved


Hands-on
1. Add a Collaborator in your GitHub repository, by creating an alternate account

2. Protect the Master branch, from getting changes directly pushed on it

3. Push changes to the repository, in a feature branch

4. Create a Pull Request from the feature branch to the Master Branch

5. From the owner’s account approve the pull request

Copyright IntelliPaat, All rights reserved


Git Workflow

Copyright IntelliPaat, All rights reserved


Git Workflow
A Git Workflow is a recipe or recommendation for how to use Git to accomplish work
in a consistent and productive manner. Git workflows encourage users to leverage
Git effectively and consistently.

There are the three popular workflows which are accepted and are followed by various tech companies:

Centralized Workflow Feature Branching GitFlow Workflow

Ma s ter

Ma s ter

Hotfi x
Fea ture

Rel ease

Copyright IntelliPaat, All rights reserved


Git Workflow
This workflow doesn’t require any other branch other than master

All the changes are directly made on the master, and finally
Centralized Workflow merged on the remote master, once work is finished

Before pushing changes, the master is rebased with the remote


commits

Feature Branching Results in a clean, linear history

GitFlow Workflow

Copyright IntelliPaat, All rights reserved


Git Workflow

Master only contains the production ready code

Centralized Workflow Any Development work, is converted into a feature branch

There can be numerous feature branches, depending on the


application’s development plan

Once the feature is complete, the feature branch is merged with


Feature Branching
the master

Ma s ter
GitFlow Workflow

Fea ture

Copyright IntelliPaat, All rights reserved


Git Workflow
The Feature branches are never merged directly with master

Once the features are ready, commit is merged with Develop


Centralized Workflow
When there are enough commits on Develop, we merge the
Develop branch with Release branch, only read me files or License
files are added after this commit on Release

Any quick fixes which are required, are done on the Hotfix branch,
Feature Branching
this branch can directly be merged with Master

Hotfi x
v1 v2 v 2.1 v3
Ma s ter
GitFlow Workflow Rel ease

Devel op

Fea ture A

Fea ture B
Copyright IntelliPaat, All rights reserved
Forking in GitHub

Copyright IntelliPaat, All rights reserved


What is Forking?
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without
affecting the original project. Most commonly, forks are used to either suggest changes to someone else's
project or to use someone else's project as a starting point for your own idea.

Copyright IntelliPaat, All rights reserved


Forking in GitHub

Forking is a GitHub concept, it has nothing to do with Git


software

It is used to copy someone else’s repository to your own


repo in GitHub

The changes made to a forked repository are not


reflected in the parent repository

If one wants to suggest any change to the parent


repository from the forked repository

Copyright IntelliPaat, All rights reserved


Quiz

Copyright IntelliPaat, All rights reserved


Quiz

1. Which of the following is a characteristics of a Centralized Version Control System?

A. Local Operations are fast

B. Version History is available on the


local storage as well

C. Version History is not available on the


local storage as well

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

1. Which of the following is a characteristics of a Centralized Version Control System?

A. Local Operations are fast

B. Version History is available on the


local storage as well

C. Version History is not available on


the local storage as well

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

2. Which of the following should git rebase be used on?

A. Master Branch

B. Remote Branch

C. Local Branch

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

2. Which of the following should git rebase be used on?

A. Master Branch

B. Remote Branch

C. Local Branch

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

3. Which of the following workflow should be used, if we want to deploy multiple


features at once?

A. Centralized Workflow

B. Feature Workflow

C. GitFlow Workflow

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

3. Which of the following workflow should be used, if we want to deploy multiple


features at once?

A. Centralized Workflow

B. Feature Workflow

C. GitFlow Workflow

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

4. Forking helps us in __________

A. Cloning the Repository

B. Copying a Repository to your GitHub


account

C. Suggesting Changes to the present


repository

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

4. Forking helps us in __________

A. Cloning the Repository

B. Copying a Repository to your GitHub


account

C. Suggesting Changes to the present


repository

D. None of these

Copyright IntelliPaat, All rights reserved


Quiz

5. Merge Conflicts occur when,

A. Two developers simultaneously


commit to a repository

B. Two or more developers try to


merge on local system

C. Two or more developers try to


merge to the remote repository

D. Two developers who worked on the


same file, try to merge on the branch

Copyright IntelliPaat, All rights reserved


Quiz

5. Merge Conflicts occur when,

A. Two developers simultaneously


commit to a repository

B. Two or more developers try to


merge on local system

C. Two or more developers try to


merge to the remote repository

D. Two developers who worked on the


same file, try to merge on the branch

Copyright IntelliPaat, All rights reserved


India : +91-7847955955

US : 1-800-216-8930 (TOLL FREE)

Thank You
[email protected]

24X7 Chat with our Course Advisor

Copyright IntelliPaat, All rights reserved

You might also like