Top GIT Interview Questions
Git is an open source code management system (SCM) which can control the source code of small and large scale projects in a very efficient way along with speed. It uses C language to maintain high level languages easily.
GIT - Education Funda |
Let's jump into "Top 10 GIT Interview Questions":
Important Notes For You
GIT Repository
A repository consists of a list named .git, where git holds all of its metadata for the catalogue. The content of the .git file is private to Git.
GIT Stash
- When we do some edits and this edit we don’t want to push in the master branch so we can use the ‘git stash’ command. It will store the edits in Stack and our production branch will not reflect with it.
- For getting these changes again we can create a new branch and use ‘git status pop’ for retrieving the ‘git stash’ edits.
- We can remove the last added stash via the ‘git stash drop’ command and if we want to use specific then we can also do it via passing arguments.
- For showing listings of all stash we can use ‘git stash list’.
GIT Log
If we want to see all commits then we can use the ‘git log’ command which will give a list of it in the most recent order and also show a commit ID which is important if we want to do any event in a specific commit. Like ‘git stash pop commit_id’
GIT Pull
We can use the ‘git pull’ command to get the latest code into a branch from our working directory.
When we want to pull master branch into any lock branch then we can use the ‘git pull origin master’ command.Thanks for reading this article, I hope this will help you to improve your git knowledge as well as helpful in software engineers interview.
Comments
Post a Comment