12) How will you know in GIT if a branch has been already merged into master? ❖ Git branch—merged lists the branches that have been merged into the current branch ❖ Git branch—-no merged lists the branches that have not been merged 13) What is the function of git clone? The git clone command creates a copy of an existing Git repository. To get the copy of a central repository, ‘cloning’ is the most common way used by programmers. 14) What is the function of ‘git config’? The ‘git config’ command is a convenient way to set configuration options for your Git installation. Behaviour of a repository, user info, preferences etc. can be defined through this command. 15) How can you bring a new feature in the main branch? To bring a new feature in the main branch, you can use a command “git merge” or “git pull command”. 16) What is ‘head’ in git and how many heads can be created in a repository? A ‘head’ is simply a reference to a commit object. In every repository, there is a default head referred as “Master”. A repository can contain any number of heads. 17) How can you create a repository in Git? In Git, to create a repository, create a directory for the project if it does not exist, and then run command “git init”. By running this command. git directory will be created in the project directory, the directory does not need to be empty. 18) What does commit object contain? a) A set of files, representing the state of a project at a given point of time b) Reference to parent commit objects c) A SHAI name, a 40-character string that uniquely identifies the commit object.

12) How will you know in GIT if a branch has been already merged into
master?
❖ Git branch—merged lists the branches that have been merged into the current branch
❖ Git branch—-no merged lists the branches that have not been merged
13) What is the function of git clone?
 The git clone command creates a copy of an existing Git repository. To get the
copy of a central repository, ‘cloning’ is the most common way used by programmers.
14) What is the function of ‘git config’?
 The ‘git config’ command is a convenient way to set configuration options for
your Git installation. Behaviour of a repository, user info, preferences etc. can be defined through this
command.
15) How can you bring a new feature in the main branch?
 To bring a new feature in the main branch, you can use a command “git merge” or “git
pull command”.
16) What is ‘head’ in git and how many heads can be created in a repository?
 A ‘head’ is simply a reference to a commit object. In every repository,
there is a default head referred as “Master”. A repository can contain any number of heads.
17) How can you create a repository in Git?
 In Git, to create a repository, create a directory for the project if it does not exist, and
then run command “git init”. By running this command. git directory will be created in the project
directory, the directory does not need to be empty.
18) What does commit object contain?
 a) A set of files, representing the state of a project at a given point of time
 b) Reference to parent commit objects
 c) A SHAI name, a 40-character string that uniquely identifies the commit object.

Comments