GIT Interview Questions and Answers

GIT Interview Questions

How to rebase master in git? Difference between rebase and merge. How to squash or fixup commits?

Rebasing is the process of moving a branch to a new base commit.

The golden rule of git rebase is to never use it on public branches. … The only way to synchronize the two master branches is to merge them back together, resulting in an extra merge commit and two sets of commits that contain the same changes.

What are Git repository hosting services you used?

Github, Bitbucket, Gitlab or you can specify if you have used something else here.

What is the syntax for “Rebasing” in Git?

Syntax: “git rebase [new-commit] “

Inclined to build a profession as Git Developer? Then here is the blog post on Git Training Videos.

What are the differences between 'git pull' and 'git fetch'?

Git pull automatically merges the commits without letting you review them first.

Git fetch stores them in your local repository but it not merge them with your current branch.

git fetch similar to guit pull but it does not merge the changes.

What language is used in GIT?

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

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 middle of something and need to jump over to the other job, and at the same time you don’t want to lose your current edits then you can use GIT stash.

For an Indepth knowledge on Git, click on below