Here we have compiled the most probable DevOps interview questions asked in the industry. You will learn about software version control, Git repository, reverting a commit in Git, Vagrant, continuous testing elements, and the importance of continuous integration, testing, and deployment. These questions are curated after discussing with many interviewers and DevOps Training experts.
GIT is the most popular and widely used distributed version control system (DVCS) and source code management (SCM) tool with lightning speed, data integrity and efficiency. Git snapshots each and every commit you do, it becomes easy to track the version you saved, and in case you can revert to whichever version you need.
Git repository is nothing but a location where you can store all files related to your project, when you commit your code. Normally a repository contains a directory named ".git" along with your project files, where git keeps all of its metadata of the repository. The content in the ".git" is private to git. For ‘bare-repository’ ".git" directory will not be there but git’s metadata store in the same directory where you store your projects files.
a) Git is Open source
b) Better branching system
b) High availability, very reliable
c) Only one .git directory per repository
d) Superior disk utilization and network performance
f) Light weight and Lighting speed
e) Collaboration friendly and compatible with previous version control system
f) Any sort of projects can use GIT.
Command to write a commit message is "git commit –m < commit message >". The "–m" on the command line instructs git to commit the new content of all files that have been modified or created. You can use "git add
Its ‘C’ language, GIT is fast as ‘C’ language makes this possible by reducing the overhead of runtimes associated with high level languages.
Difference between GIT and SVN are
|Git is a Distributed Version Control tool||SVN is not a Distributed Version Control tool|
|Git Commits are unchangeable||A tag can be treated as a branch and multiple versions can be committed|
|Clients can clone entire repositories on their local systems||Can't Clone Version history|
|Commits are possible even if offline||Offline Commits are not possible|
|Push/pull operations are faster||Push/pull operations are slower|
|Git is less preferred in case of extremely large files or frequently changing binary files||SVN allows to multiple projects with in a same repository|
|Works are shared automatically by a commit||Nothing is shared automatically|
Git and SVN are each viable workflow and version control systems, Git will allow you to store versions of a project, and it has stage area where you can store your uncommitted changes and you can also do patch staging in case you and your co-developer are working on same file then you can patch your work to the file by using ‘-p’ flag while git add. And Git has a better branching system and git stash too.
Before committing your changes to git you can add changes to git using git add < file_name >, it is reviewed as an intermediate area known as ‘Staging Area’ or ‘Index’.
Can't say yes or no to this. It’s up to you, Git and SVN are each viable workflow and VCS. There are lots of grounds where both differ with each other, of course git is latest to SVN includes advanced features.
‘GIT PUSH’ publishes local repository changes into remote repositories so that others can take those changes.
Contact us for your training requirements! Exchange ideas, develop relationships, and stay up-to-date with emerging practices in the ever-evolving DevOps & Cloud arena.
2023 Gamut Gurus Pvt Ltd, All rights Reserved.
3rd floor, Sigma Tech Park Gamma Block, Varthur kodi, Whitefield, Bengaluru, Karnataka-560066