If you're looking for Git Interview Questions 2018 for Freshers and Experienced, then you are at right place. There are a lot of job opportunities from many reputed companies in the world. According to research, Git has a market share of about 68% in version control management. So, You still have the opportunity to move ahead in your career. Here Mindmajix offers advanced Git Interview Questions And Answers 2019 that helps you in cracking your job interview.
A) Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
2) What is the relationship between GIT and SCM tools?
A) SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.
3) Can you explain about Branching and Merging in GIT?
A) The Git feature that really makes it stand apart from nearly every other SCM out there is its branching model.
Git allows and encourages you to have multiple local branches that can be entirely independent of each other. The creation, merging, and deletion of those lines of development takes seconds.
4) How do you rate GIT in terms of speed?
A) Git is fast. Speed and performance has been a primary design goal of the Git from the start. With Git, nearly all operations are performed locally, giving it a huge speed advantage on centralized systems that constantly have to communicate with a server somewhere.
Git was built to work on the Linux kernel, meaning that it has had to effectively handle large repositories from day one. Git is written in C, reducing the overhead of runtimes associated with higher-level languages.
5) What is a pull in git?
A) git-pull - Fetch from and integrate with another repository or a local branch
SYNOPSIS: git pull [options] [ […?]]
In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD. More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch. should be the name of a remote repository as passed to git-fetch
6) What does git commit a?
A) Basically git commit "records changes to the repository" while git push "updates remote refs along with associated objects". So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository.
7) Why do you use GIT?
A) Git is a version control system (VCS) 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.
8) What is the purpose of Git?
A) The purpose of Git is to manage a project, or a set of files, as they change over time. Git stores this information in a data structure called a repository.
9) What do you mean by git add?
A) git add . adds all modified and new (untracked) files in the current directory and all subdirectories to the staging area (a.k.a. the index), thus preparing them to be included in the next git commit. Any files matching the patterns in the .gitignore file will be ignored by git add.
10) What is the difference between Git and Github?
A) Git is a revision control system, a tool to manage your source code history.
GitHub is a hosting service for Git repositories.
GitHub is a website where you can upload a copy of your Git repository. It is a Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.
11) What does git pull rebase do?
A) git pull --rebase is allows you to later squash your commits to a few (or one) commits. If you have merges in your (unpushed) history, it is not so easy to do a git rebase later one.
12) What does git pull origin master do?
A) git pull origin master pulls the master branch from the remote called origin into your current branch. It only affects your current branch, not your local master branch.
13) What is the difference between SVN and Git?
A) In short, svn is a Centralized Revision Control System, and git is a Distributed Revision Control System (DVCS).
14) What is a stash in git?
A) Stashing takes the dirty state of your working directory, that is, your modified tracked files and staged changes and saves it on a stack of unfinished changes that you can reapply at any time.
15) What is git pull origin?
A) pull is a fetch and a merge. * `git pull origin master` fetches commits from the master branch of the origin remote (into the local origin/master branch), and then it merges origin/master into the branch you currently have checked out.
Free Demo for Corporate & Online Trainings.