Skip to content

Desi banjara

learn and grow together

  • Azure
    • Azure Compute
      • Azure Logic Apps
      • Azure Mobile Apps
      • Azure App Service
      • Azure Serverless Computing
        • Azure Functions
    • Azure Networking services
      • Azure Networking – VNET
    • Azure Database Services
      • Azure SQL
      • Azure Data Factory
      • Azure Databricks
    • Azure Analytics Services
    • Azure Cognitive Services
    • Azure Data and Storage
    • Azure Devops
    • Azure landing zone
    • Azure IaaS
    • Azure Internet of Things (IoT)
      • Azure Machine Learning
      • Azure AI and ML services
    • Azure Migration
    • Microsoft Azure Log Analytics
  • Azure Security
    • Azure Identity and Access Management
    • Azure Active Directory
    • Azure Defender
    • Azure security tools for logging and monitoring
    • Azure Sentinel
    • Azure Sentinel – Data connectors
  • Agile Software development
    • Atlassian Jira
  • Amazon Web Services (AWS)
    • Amazon EC2
    • Amazon ECS
    • AWS Lambda
  • Google
    • Google Cloud Platform (GCP)
    • gmail api
    • Google Ads
    • Google AdSense
    • Google Analytics
    • Google Docs
    • Google Drive
    • Google Maps
    • Google search console
  • Software architecture
    • Service-oriented architecture (SOA)
    • Domain-Driven Design (DDD)
    • Microservices
    • Event-Driven Architecture
    • Command Query Responsibility Segregation (CQRS) Pattern
    • Layered Pattern
    • Model-View-Controller (MVC) Pattern
    • Hexagonal Architecture Pattern
    • Peer-to-Peer (P2P) pattern
    • Pipeline Pattern
  • Enterprise application architecture
  • IT/Software development
    • API development
    • ASP.Net MVC
    • ASP.NET Web API
    • C# development
    • RESTful APIs
  • Cybersecurity
    • Cross Site Scripting (XSS)
    • Reflected XSS
    • DOM-based XSS
    • Stored XSS attacks
    • Ransomware
    • cyber breaches
    • Static Application Security Testing (SAST)
  • Interview questions
    • Microsoft Azure Interview Questions
    • Amazon Web Services (AWS) Interview Questions
    • Agile Software development interview questions
    • C# interview questions with answers
    • Google analytics interview questions with answers
    • Javascript interview questions with answers
    • Python interview questions with answers
    • WordPress developer interview questions and answers
  • Cloud
    • Cloud computing
    • Infrastructure as a Service (IaaS)
    • Platform as a Service (PaaS)
    • Software as a Service (SaaS)
    • Zero Trust strategy
  • Toggle search form
  • Kubernetes Overview Kubernetes
  • Getting Started with Azure App Service Azure
  • Microsoft AI-900 Certification Exam Practice Questions -3 Microsoft AI-900 Certification Exam
  • Interview question: What is the purpose of “as” operator in C#? C# development
  • How to Write an AI-Generated Article That Feels 100% Human Using ChatGPT AI Writing & Automation
  • Microsoft AZ-104 Certification Exam Practice Questions – 2 Microsoft AZ-104 Certification Exam
  • Azure SLA calculation Azure Service Level Agreement (SLA)
  • What is COBIT? Business

Top 20 GIT Interview Questions

Posted on December 25, 2018 By DesiBanjara No Comments on Top 20 GIT Interview Questions

Top 20 [amazon_textlink asin=’B01ISNIKES|1449316387′ text=’GIT ‘ template=’ProductLink’ store=’desibanjara22-21|desibanjaraco-21′ marketplace=’IN|UK’ link_id=’68a83645-0879-11e9-9eea-b3538ea6ba7b’] interview questions:

 

  1. What is a repository in GIT?

Git stores this information in a data structure called a repository. 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.

  1. How can you create a repository in Git?

In Git, to create a repository, create a directory for the project if it does not exist, and then run command “git init”. By running this command .git directory will be created in the project directory, the directory does not need to be empty.

  1. What is git clone command do?

The git clone command creates a copy of an existing Git repository.  To get the copy of a central repository, ‘cloning’ is the most common way used by programmers.

  1. 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”.

–a option instructs git to commit the new content of all tracked files that have been modified.

  1. What is ‘git push’ in GIT?

‘git push’ updates remote refs along with associated objects.

git push –f option you can use to do force push

  1. What is another option for merging?

“Rebasing” is an alternative to merging in git.

  1. What is “Rebasing” and what is the syntax for “Rebasing” in Git?

git rebase is a command which will merge another branch into the branch where you are currently working, and move all of the local commits that are ahead of the rebased branch to the top of the history on that branch.

The syntax for rebase is

“git rebase [new-commit] “

  1. 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.

Example if you want to rebase with develop but you have some local changes. You can stash it first and then do the rebase. Once you will be happy with rebase. You can do “stash pop” to get that changes back in your branch. Steps below:

git stash

git stash list

git checkout develop

git pull

git checkout feature-nhso-3227-emis-linkage-status-codes

git rebase develop

git status

git stash pop

  1. What is GIT stash drop?

When you are done with the stashed item or want to remove it from the list, run the git ‘stash drop’ command.  It will remove the last added stash item by default, and it can also remove a specific item if you include as an argument.

  1. What is the difference between ‘git remote’ and ‘git clone’?

‘git remote add’  just creates an entry in your git config that specifies a name for a particular URL.  While, ‘git clone’ creates a new git repository by copying and existing one located at the URI.

[amazon_link asins=’1449325866′ template=’ProductAd’ store=’desibanjara22-21′ marketplace=’IN’ link_id=’29351ecb-087a-11e9-b084-c1b28661d721′]

[amazon_link asins=’1449325866′ template=’ProductAd’ store=’desibanjaraco-21′ marketplace=’UK’ link_id=’29351ecb-087a-11e9-b084-c1b28661d721′]

  1. What is the function of ‘git diff ’ in git?

‘git diff ’ shows the changes between commits, commit and working tree etc.

  1. What is ‘git status’ is used for?

As ‘Git Status’ shows you the difference between the working directory and the index, it is helpful in understanding a git more comprehensively.

  1. What is the difference between the ‘git diff ’and ‘git status’?

‘git diff’ is similar to ‘git status’, but it shows the differences between various commits and also between the working directory and index.

  1. What is the function of ‘git checkout’ in git?

A ‘git checkout’ command is used to update directories or specific files in your working tree with those from another branch without merging it in the whole branch.

  1. What is the function of ‘git rm’?

To remove the file from the staging area and also off your disk ‘git rm’ is used.

  1. What is the function of ‘git stash apply’?

When you want to continue working where you have left your work, ‘git stash apply’ command is used to bring back the saved changes onto the working directory.

  1. What is the use of ‘git log’?

To find specific commits in your project history- by author, date, content or history ‘git log’ is used.

  1. What is ‘git add’ is used for?

‘git add’ adds file changes in your existing directory to your index.

  1. What is the function of ‘git reset’?

The function of ‘Git Reset’ is to reset your index as well as the working directory to the state of your last commit.

reset git branch to origin version:

git checkout mybranch

git reset –hard origin/mybranch

  1. How will you know in GIT if a branch has been already merged into master?

Git branch—merged lists the branches that have been merged into the current branch

Git branch—-no merged lists the branches that have not been merged

[amazon_link asins=’1787120724,B0769JLP9C,1449325866,B01ISNIKES,8132231937,B07CDV9LJD,B00QFIA5OC,1782168451,1783553758′ template=’ProductGrid’ store=’desibanjara22-21′ marketplace=’IN’ link_id=’75aeb652-0879-11e9-aaed-6744dc20efd0′]

[amazon_link asins=’1449316387,1617292419,1789137543,B00QFIA5OC,1449325866,B01GO8ZVFA,1491911182,1978117515,1484200772′ template=’ProductGrid’ store=’desibanjaraco-21′ marketplace=’UK’ link_id=’9997ad94-0879-11e9-bc08-4dbf6eb24b6c’]

GIT, Interview questions, IT/Software development Tags:GIT, Interview questions, IT/Software development

Post navigation

Previous Post: ASP.Net MVC Interview Questions
Next Post: IAAS vs PAAS vs SAAS – different types of cloud services

Related Posts

  • Interview question: What are the two types of data type in C#? C# development
  • ASP.Net MVC Interview Questions ASP.Net MVC
  • Interview question: What is the purpose of “is” operator in C#? C# development
  • Interview question: What is the difference between dynamic type variables and object type variables? C# development
  • Differences between struct and classes in C# : Interview question C# development
  • Interview question: In c#, How can we create a function which can accept varying number of arguments? C# development

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Categories

  • Agile Software development
  • AI Writing & Automation
  • Amazon AWS Certification Exam
  • Amazon EC2
  • Amazon ECS
  • Amazon Web Services (AWS)
  • Apache Kafka
  • API development
  • API development
  • Apple Mac
  • Applications of Graph Theory
  • ARM templates
  • Artificial intelligence
  • ASP.NET Core
  • ASP.Net MVC
  • ASP.NET Web API
  • Atlassian Jira
  • Availability zones
  • AWS DevOps Engineer Professional Exam
  • AWS Lambda
  • AZ-300: Microsoft Azure Architect Technologies Exam
  • Azure
  • Azure Active Directory
  • Azure AD B2C
  • Azure AD Domain Services
  • Azure AI and ML services
  • Azure Analytics Services
  • Azure App Service
  • Azure Application Gateway
  • Azure Archive Storage
  • Azure Blob Storage
  • Azure Cache for Redis
  • Azure Cognitive Services
  • Azure Compute
  • Azure Container Instances (ACI)
  • Azure Core Services
  • Azure Cosmos DB
  • Azure Data and Storage
  • Azure Data Factory
  • Azure Data Lake Storage
  • Azure Database for MySQL
  • Azure Database for PostgreSQL
  • Azure Database Migration Service
  • Azure Database Services
  • Azure Databricks
  • Azure DDoS Protection
  • Azure Defender
  • Azure Devops
  • Azure Disk Storage
  • Azure ExpressRoute
  • Azure File Storage
  • Azure Firewall
  • Azure Functions
  • Azure HDInsight
  • Azure IaaS
  • Azure Identity and Access Management
  • Azure instance metadata service
  • Azure Internet of Things (IoT)
  • Azure Key Vault
  • Azure Kubernetes Service (AKS)
  • Azure landing zone
  • Azure Lighthouse
  • Azure Load Balancer
  • Azure Logic Apps
  • Azure Machine Learning
  • Azure Machine Learning
  • Azure Migration
  • Azure Mobile Apps
  • Azure Network Watcher
  • Azure Networking – VNET
  • Azure Networking services
  • Azure Pricing and Support
  • Azure Pricing Calculator
  • Azure Queue Storage
  • Azure regions
  • Azure Resource Manager
  • Azure Security
  • Azure Security Center
  • Azure Security Information and Event Management (SIEM)
  • Azure security tools for logging and monitoring
  • Azure Security, Privacy, Compliance, and Trust
  • Azure Sentinel
  • Azure Sentinel – Data connectors
  • Azure Serverless Computing
  • Azure Service Level Agreement (SLA)
  • Azure SLA calculation
  • Azure SQL
  • Azure SQL Database
  • Azure Storage
  • Azure Stream Analytics
  • Azure Synapse Analytics
  • Azure Table Storage
  • Azure Virtual Machine
  • Azure VNET
  • Azure VPN Gateway
  • Blogging
  • Business
  • C# development
  • C# interview questions with answers
  • Career success
  • CDA (Clinical Document Architecture)
  • ChatGPT
  • CI/CD pipeline
  • CISSP certification
  • CKEditor
  • Cloud
  • Cloud computing
  • Cloud Computing Concepts
  • Cloud FinOps
  • Cloud FinOps Optmisation
  • Cloud services
  • COBIT
  • Command Query Responsibility Segregation (CQRS) Pattern
  • Configure SSL offloading
  • Content Creation
  • Content management system
  • Continuous Integration
  • conversational AI
  • Cross Site Scripting (XSS)
  • cyber breaches
  • Cybersecurity
  • Data Analysis
  • Data Clean Rooms
  • Data Engineering
  • Data Warehouse
  • Database
  • DeepSeek AI
  • DevOps
  • DevSecOps
  • Docker
  • DOM-based XSS
  • Domain-Driven Design (DDD)
  • Dynamic Application Security Testing (DAST)
  • Enterprise application architecture
  • Event-Driven Architecture
  • GIT
  • git
  • gmail api
  • Google
  • Google Ads
  • Google AdSense
  • Google Analytics
  • Google analytics interview questions with answers
  • Google Cloud Platform (GCP)
  • Google Docs
  • Google Drive
  • Google Flights API
  • Google Maps
  • Google search console
  • Graph Algorithms
  • Graph theory
  • Healthcare Interoperability Resources
  • Hexagonal Architecture Pattern
  • HL7 vs FHIR
  • HTML
  • IBM qradar
  • Information security
  • Infrastructure as a Service (IaaS)
  • Internet of Things (IoT)
  • Interview questions
  • Introduction to DICOM
  • Introduction to FHIR
  • Introduction to Graph Theory
  • Introduction to HL7
  • IT governance
  • IT Infrastructure networking
  • IT/Software development
  • Javascript interview questions with answers
  • Kubernetes
  • Layered Pattern
  • Leadership
  • Leadership Quote
  • Life lessons
  • Load Balancing Algorithms
  • Low-code development platform
  • Management
  • Microservices
  • Microservices
  • Microsoft
  • Microsoft 365 Defender
  • Microsoft AI-900 Certification Exam
  • Microsoft AZ-104 Certification Exam
  • Microsoft AZ-204 Certification Exam
  • Microsoft AZ-900 Certification Exam
  • Microsoft Azure
  • Microsoft Azure certifications
  • Microsoft Azure Log Analytics
  • Microsoft Cloud Adoption Framework
  • Microsoft Exam AZ-220
  • Microsoft Exam AZ-400
  • Microsoft Excel
  • Microsoft Office
  • Microsoft Teams
  • Microsoft Teams
  • Microsoft word
  • Model-View-Controller (MVC) Pattern
  • Monitoring and analytics
  • NoSQL
  • OpenAI
  • OutSystems
  • Peer-to-Peer (P2P) pattern
  • Personal Growth
  • Pipeline Pattern
  • PL-100: Microsoft Power Platform App Maker
  • PL-200: Microsoft Power Platform Functional Consultant Certification
  • PL-900: Microsoft Power Platform Fundamentals
  • Platform as a Service (PaaS)
  • Postman
  • Project management
  • Python interview questions with answers
  • Rally software
  • Ransomware
  • Reflected XSS
  • RESTful APIs
  • Rich Text Editor
  • SC-100: Microsoft Cybersecurity Architect
  • Scrum Master Certification
  • Service-oriented architecture (SOA)
  • SIEM
  • Software architecture
  • Software as a Service (SaaS)
  • SonarQube
  • Splunk
  • SQL
  • SQL Azure Table
  • SQL Server
  • Startup
  • Static Application Security Testing (SAST)
  • Stored XSS attacks
  • System Design Interview
  • Table Storage
  • Test Driven Development (TDD)
  • TinyMCE
  • Top technology trends for 2023
  • Types of Graphs
  • Uncategorized
  • User Experience (UX) design
  • Version control system
  • virtual machine scale set
  • visual studio
  • WCF (Windows Communication Foundation)
  • Web development
  • Windows Hello
  • WordPress
  • WordPress developer interview questions and answers
  • Yammer
  • Zero Trust strategy



Recent Posts

  • Ace Your FAANG System Design Interview like Google & Amazon: The 8 Whitepapers You Must Read
  • From $0 to $10K/Month Writing Online – The Exact Roadmap to Build a Profitable Writing Career
  • How to Write an AI-Generated Article That Feels 100% Human Using ChatGPT
  • DeepSeek AI: The OpenAI Rival You Didn’t See Coming (But Should)
  • 10 Ways AI is Revolutionizing Healthcare (And Why Your Doctor Might Just Be a Robot Soon)
  • Azure HDInsight Azure HDInsight
  • Google AdSense Google
  • What is ASP.NET Web API ? ASP.NET Web API
  • AZ-300: Microsoft Azure Architect Technologies Exam Preparation AZ-300: Microsoft Azure Architect Technologies Exam
  • Microsoft AZ-900 Certification Exam Practice Questions – 5 Microsoft AZ-900 Certification Exam
  • Differences between SQL and NoSQL Databases Database
  • How to take a screenshot on Google Pixels? Google
  • CDA (Clinical Document Architecture) CDA (Clinical Document Architecture)

Copyright © 2025 Desi banjara.

Powered by PressBook News WordPress theme