Git Interview Questions And Answers

Git Interview Questions list for experienced

  1. What is GIT?
  2. What is a repository in GIT?
  3. What is the command you can use to write a commit message?
  4. What is the difference between GIT and SVN?
  5. What are the advantages of using GIT?
  6. What language is used in GIT?
  7. What is the function of 'GIT PUSH' in GIT?
  8. Why GIT better than Subversion?
  9. What is "Staging Area" or "Index" in GIT?
  10. What is GIT stash?
  11. What is GIT stash drop?
  12. How will you know in GIT if a branch has been already merged into master?
  13. What is the function of git clone?
  14. What is the function of 'git config'?
  15. What does commit object contain?
  16. How can you create a repository in Git?
  17. What is 'head' in git and how many heads can be created in a repository?
  18. What is the purpose of branching in GIT?
  19. What is the common branching pattern in GIT?
  20. How can you bring a new feature in the main branch?
  21. What is a 'conflict' in git?
  22. How can conflict in git resolved?
  23. To delete a branch what is the command that is used?
  24. What is another option for merging in git?
  25. What is the syntax for "Rebasing" in Git?
  26. What is the difference between 'git remote' and 'git clone'?
  27. What is GIT version control?
  28. Mention some of the best graphical GIT client for LINUX?
  29. What is Subgit? Why to use Subgit?
  30. What is the function of 'git diff ' in git?
  31. What is 'git status' is used for?
  32. What is the difference between the 'git diff 'and 'git status'?
  33. What is the function of 'git checkout' in git?
  34. What is the function of 'git rm'?
  35. What is the function of 'git stash apply'?
  36. What is the use of 'git log'?
  37. What is 'git add' is used for?
  38. What is the function of 'git reset'?
  39. What is git Is-tree?
  40. How git instaweb is used?
  41. What does 'hooks' consist of in git?
  42. Explain what is commit message?
  43. How can you fix a broken commit?
  44. Why is it advisable to create an additional commit rather than amending an existing commit?
  45. What is 'bare repository' in GIT?

Git interview questions and answers on advance and basic Git with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Git also add your Questions if any you have to ask and for apply in Git Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.

Top Git interview questions and answers for freshers and experienced

What is Git ?

Answer : Git is an open-source distributed version control system (DVCS)

Questions : 1 :: What is GIT?

GIT is a distributed version control system and source code management (SCM) system with an emphasis to handle small and large projects with speed and...View answers

Questions : 2 :: What is a repository in GIT?

A repository contains a directory named .git, where git keeps all of its metadata for the repository. The content of the .git directory are private to...View answers

Questions : 3 :: What is the command you can use to write a commit message?


The command that is used to write a commit message is “git commit –a”.  The –a on the command line instructs git to commit the new content of all tracked files...View answers

Questions : 4 :: What is the difference between GIT and SVN?

The difference between GIT and SVN is a)      Git is less preferred for handling extremely large files or frequently changing binary files while SVN can handle...View answers

Questions : 5 :: What are the advantages of using GIT?

a)      Data redundancy and replication b)      High availability c)       Only one.git directory per...View answers

Questions : 6 :: What language is used in GIT?


GIT is fast, and ‘C’ language makes this possible by reducing the overhead of runtimes associated with higher...View answers

Questions : 7 :: What is the function of 'GIT PUSH' in GIT?

‘GIT PUSH’ updates remote refs along with associated...View answers

Questions : 8 :: Why GIT better than Subversion?

GIT is an open source version control system; it will allow you to run ‘versions’ of a project, which show the changes that were made to the code overtime also it allows you...View answers

Questions : 9 :: What is "Staging Area" or "Index" in GIT?


Before completing the commits, it can be formatted and reviewed in an intermediate area known as ‘Staging Area’ or...View answers

Questions : 10 :: What is GIT stash?

GIT stash takes the current state of the working directory and index and puts in on the stack for later and gives you back a clean working directory.  So in case if you are in the...View answers

Questions : 11 :: What is GIT stash drop?

When you are done with the stashed item or want to remove it from the list, run the git ‘stash drop’ command.  It will remove the last added stash item by default, and it...View answers

Questions : 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...View answers

Questions : 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...View answers

Questions : 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...View answers

Questions : 15 :: 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...View answers

Questions : 16 :: 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...View answers

Questions : 17 :: 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...View answers

Questions : 18 :: What is the purpose of branching in GIT?

The purpose of branching in GIT is that you can create your own branch and jump between those branches. It will allow you to go to your previous work keeping your recent work...View answers

Questions : 19 :: What is the common branching pattern in GIT?

The common way of creating branch in GIT is to maintain one as “Main“ branch and create another branch to implement new features. This pattern is particularly useful when there...View answers

Questions : 20 :: 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...View answers

Questions : 21 :: What is a 'conflict' in git?

A ‘conflict’ arises when the commit that has to be merged has some change in one place, and the current commit also has a change at the same place. Git will not be able to...View answers

Questions : 22 :: How can conflict in git resolved?

To resolve the conflict in git, edit the files to fix the conflicting changes and then add the resolved files by running “git add” after that to commit the repaired merge, ...View answers

Questions : 23 :: To delete a branch what is the command that is used?

Once your development branch is merged into the main branch, you don’t need development branch.  To delete a branch use, the command “git branch –d...View answers

Questions : 24 :: What is another option for merging in git?

“Rebasing” is an alternative to merging in...View answers

Questions : 25 :: What is the syntax for "Rebasing" in Git?

The syntax used for rebase is “git rebase [new-commit]...View answers

Questions : 26 :: What is the difference between 'git remote' and 'git clone'?

‘git remote add’  just creates an entry in your git config that specifies a name for a particular URL.  While, ‘git clone’ creates a new git repository by...View answers

Questions : 27 :: What is GIT version control?

With the help of GIT version control, you can track the history of a collection of files and includes the functionality to revert the collection of files to another version.  Each...View answers

Questions : 28 :: Mention some of the best graphical GIT client for LINUX?

a)      Git Cola b)      Git-g c)       Smart git d)     ...View answers

Questions : 29 :: What is Subgit? Why to use Subgit?

‘Subgit’ is a tool for a smooth, stress-free SVN to Git migration.  Subgit is a solution for a company -wide migration from SVN to Git that...View answers

Questions : 30 :: What is the function of 'git diff ' in git?

‘git diff ’ shows the changes between commits, commit and working tree...View answers

Questions : 31 :: What is 'git status' is used for?

As ‘Git Status’ shows you the difference between the working directory and the index, it is helpful in understanding a git more...View answers

Questions : 32 :: What is the difference between the 'git diff 'and 'git status'?

'git diff’ is similar to ‘git status’, but it shows the differences between various commits and also between the working directory and...View answers

Questions : 33 :: What is the function of 'git checkout' in git?

A ‘git checkout’ command is used to update directories or specific files in your working tree with those from another branch without merging it in the whole...View answers

Questions : 34 :: What is the function of 'git rm'?

To remove the file from the staging area and also off your disk ‘git rm’ is...View answers

Questions : 35 :: What is the function of 'git stash apply'?

When you want to continue working where you have left your work, ‘git stash apply’ command is used to bring back the saved changes onto the working...View answers

Questions : 36 :: What is the use of 'git log'?

To find specific commits in your project history- by author, date, content or history ‘git log’ is...View answers

Questions : 37 :: What is 'git add' is used for?

'git add’ adds file changes in your existing directory to your...View answers

Questions : 38 :: What is the function of 'git reset'?

The function of ‘Git Reset’ is to reset your index as well as the working directory to the state of your last...View answers

Questions : 39 :: What is git Is-tree?

‘git Is-tree’ represents a tree object including the mode and the name of each item and the SHA-1 value of the blob or the...View answers

Questions : 40 :: How git instaweb is used?

'Git Instaweb’ automatically directs a web browser and runs webserver with an interface into your local...View answers

Questions : 41 :: What does 'hooks' consist of in git?

This directory consists of Shell scripts which are activated after running the corresponding Git commands.  For example, git will try to execute the post-commit script after you run a...View answers

Questions : 42 :: Explain what is commit message?

Commit message is a feature of git which appears when you commit a change. Git provides you a text editor where you can enter the modifications made in...View answers

Questions : 43 :: How can you fix a broken commit?

To fix any broken commit, you will use the command “git commit—amend”. By running this command, you can fix the broken commit message in the...View answers

Questions : 44 :: Why is it advisable to create an additional commit rather than amending an existing commit?

There are couple of reason a)      The amend operation will destroy the state that was previously saved in a commit.  If it’s just the commit message...View answers

Questions : 45 :: What is 'bare repository' in GIT?

To co-ordinate with the distributed development and developers team, especially when you are working on a project from multiple computers ‘Bare Repository’ is used. A bare...View answers
More Question

Ask your interview questions on Git

Write Your comment or Questions if you want the answers on Git from Git Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---