Skip to main content

Git interview Questions and Answers

1)What is GIT?
GIT is a distributed version control system and source code management (SCM) system with an emphasis to handle small and large projects with speed and efficiency.
2)What is a repository in GIT?
A repository contains a directory named .git, where git keeps all of its metadata for the repository. The content of the .git directory are private to git.
3)What is the command you can use to write a commit message?
The command that is used to write a commit message is “git commit –a”.  The –a on the command line instructs git to commit the new content of all tracked files that have been modified. You can use “git add<file>” before git commit –a if new files need to be committed for the first time.
4) What is the difference between GIT and SVN?
The difference between GIT and SVN is
  1. a)      Git is less preferred for handling extremely large files or frequently changing binary files while SVN can handle multiple projects stored in the same repository.
  2. b)      GIT does not support ‘commits’ across multiple branches or tags.  Subversion allows the creation of folders at any location in the repository layout.
  3. c)        Gits are unchangeable, while Subversion allows committers to treat a tag as a branch and to create multiple revisions under a tag root.
5)What are the advantages of using GIT?
  1. a)      Data redundancy and replication
  2. b)      High availability
  1. c)       Only one.git directory per repository
  2. d)      Superior disk utilization and network performance
  3. e)      Collaboration friendly
  4. f)       Any sort of projects can use GIT
6)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.
7)What is the function of ‘GIT PUSH’ in GIT?
‘GIT PUSH’ updates remote refs along with associated objects.
8)Why GIT better than Subversion?
GIT is an open source version control system; it will allow you to run ‘versions’ of a project, which show the changes that were made to the code overtime also it allows you keep the backtrack if necessary and undo those changes.  Multiple developers can checkout, and upload changes and each change can then be attributed to a specific developer.
9)What is “Staging Area” or “Index” in GIT?
Before completing the commits, it can be formatted and reviewed in an intermediate area known as ‘Staging Area’ or ‘Index’.
10)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.

Comments

Popular posts from this blog

SAP GRC Interview Questions and Answers

1.What is the use of  SAP GRC? SAP Governance , Risk and Compliance solution enables organization to manage regulations and compliance and remove any risk in managing organizations key operations. As per changing market situation organizations are growing and rapidly changing and inappropriate documents, spreadsheets are not acceptable for external auditors and regulators. 2.What are the different activities that you can perform in SAP GRC? SAP GRC helps organization to manage their regulations and compliance and you can perform following activities Easy integration of GRC activities into existing process and automating key GRC activities. Low complexity and managing risk efficiently. Improve risk management activities. Managing fraud in business processed and audit management effectively. Organizations perform better and companies can protect their values. SAP GRC solution consists of three main areas: Analyze, manage and monitor. 3.What are the different GRC m...

Apache Kafka Interview Questions and Answers

Q1) .Mention what is Apache Kafka? Ans:   Apache Kafka is a publish-subscribe messaging system developed by Apache written in Scala. It is a distributed, partitioned and replicated log service. Q2). Mention what is the traditional method of message transfer? Ans:   The traditional method of message transfer includes two methods   Queuing: In a queuing, a pool of consumers may read message from the server and each message goes to one of them •   Publish-Subscribe: In this model, messages are broadcasted to all consumers Kafka caters single consumer abstraction that generalized both of the above- the consumer group. Q3). Mention what is the benefits of Apache Kafka over the traditional technique? Ans:   Apache Kafka has following benefits above traditional messaging technique Fast: A single Kafka broker can serve thousands of clients by handling megabytes of reads and writes per second •   Scalable : Data are partitioned and streamlined ove...

Django Interview Questions and Answers

Q1).Explain what is Django? Ans1:   Django  is a web framework in python to develop a web application in python. Django is a free and open source web application framework, written in Python. Q2).Mention what are the features available in Django? Ans2:  Features available in Django are Admin Interface (CRUD) Templating Form handling Internationalization Session, user management, role-based permissions Object-relational mapping (ORM) Testing Framework Fantastic Documentation Q3).Mention the architecture of Django architecture? Ans3:  Django architecture consists of Models:  It describes your database schema and your data structure Views:  It controls what a user sees, the view retrieves data from appropriate models and execute any calculation made to the data and pass it to the template Templates:  It determines how the user sees it. It describes how the data received from the views should be changed or formatted for display on the p...