Git Interview Questions and Answers
Q1. What is Git?
Ans: Git is one of the maximum famous frameworks for source code manipulate. It has been widely followed within the open source community and lots of agencies use Git as their supply control framework of preference. It is very rapid and very bendy, even as being honest to apply.
Q2. What is GIT stash?
Ans:In case in case you are within the center of something/task and need to leap over to the other task, and at the identical time you don’t want to lose/spoil your contemporary edits then you may use GIT stash.
Q3. What is the usage of ‘git log’?
‘git log’ Show commit logs
we will find particular commits for your assignment records / metadata repository – by means of author, date, content material or records ‘git log’ is used.
Q4. What is SourceTree (ST)?
Ans: There are approaches to paintings with Git: from the command line or from a graphical consumer interface (GUI). SourceTree is the most famous pass-platform GUI for Git.
Q5. What is ‘git upload’ is used for?
‘git upload’ provides document adjustments to your existing listing for your index.
‘git add’ Add report contents to the index
Q6. What are the variations between ‘git pull’ and ‘git fetch’?
Git pullautomatically merges the commits without letting you overview them first.
Git fetchstores them on your nearby repository but it now not merge them together with your cutting-edge department.
Git fetch much like git pull but it does not merge the adjustments.
Q7. What is every other option for merging in git?
git merge, Join two or extra improvement histories together
git rebase, Reapply commits on top of every other base tip
Rebasing” is an opportunity to merging the branch in git.
Q8. What language is used in GIT?
Ans:GIT is speedy, and ‘C’ language makes this possible by way of decreasing the overhead of runtimes associated with better languages.
Q9. What is a ‘battle’ in git?
Ans:A ‘battle’ arises whilst the dedicate that needs to be merged has a few exchange in one vicinity, and the modern-day devote additionally has a exchange on the equal location. Git will no longer be capable of are expecting which trade have to take priority.
Q10. What is ‘naked repository’ in GIT?
Ans: To co-ordinate with the dispensed development and developers team, in particular whilst you are running on a project from more than one computers ‘Bare Repository’ is used. A bare repository incorporates of a version records of your code.