Skip to content

Desi banjara

  • With as much love, as I can share, I wanted to let you know I care. Sending lots of love your way, On your very special day! Happy Birthday, sweetheart! Birthday Wishes
  • How to take a screenshot on HTC One phones? Android phones
  • AWS DevOps Engineer Professional Exam Practice Questions – 8 AWS DevOps Engineer Professional Exam
  • It is your birthday. Time to light the candles on the cake and enjoy the day with lots of fun and laughter. Wishing you a very happy birthday. Birthday Wishes
  • Microsoft AZ-900 Certification Exam Practice Questions – 8 Microsoft AZ-900 Certification Exam
  • “To my mind, the greatest reward and luxury of travel is to be able to experience everyday things as if for the first time, to be in a position in which almost nothing is so familiar it is taken for granted.” – Bill Bryson Quotes
  • “If you hear a voice within you say ‘you cannot paint’, then by all means paint, and that voice will be silenced.” Vincent Van Gogh Motivational & Inspirational Quotes
  • “You yourself, as much as anyone in the entire universe, deserve your love and affection.” Buddha Motivational & Inspirational Quotes

Top 20 GIT Interview Questions

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: Happy Guru Nanak Jayanti 2018: Wishes, Quotes, Status, Messages, Greetings, SMS
Next Post: Happy New Year 2020 Wishes Images, Quotes, Status

Related Posts

  • Interview question: How does C# differ from C++? C# development
  • Interview question: What is boxing and Unboxing in C#? C# development
  • Interview question: What is Jagged Array in C#? C# development
  • Interview question: What is the use of “using” keyword in C#? C# development
  • Interview questions – Microsoft Excel Interview questions
  • Interview question: What are primitive data types in C#? C# development

Leave a Reply Cancel reply

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



Archives

  • June 2021
  • March 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • December 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • January 2018
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • August 2015
  • May 2015
  • April 2014
  • November 2013

Categories

  • Acer
  • Amazon AWS Certification Exam
  • Amazon Kindle
  • Android phones
  • ASP.Net MVC
  • ASP.NET Web API
  • AWS DevOps Engineer Professional Exam
  • AZ-300: Microsoft Azure Architect Technologies Exam
  • Best Wishes Messages
  • birthday messages for boyfriend
  • Birthday messages For Girlfriend
  • Birthday Wishes
  • Birthday Wishes For Mom
  • Business
  • C# development
  • Cameras
  • Canon
  • Cloud
  • Cloud services
  • digital-cameras
  • Diwali
  • Entrepreneurship
  • eReaders
  • Family Quotes
  • Family Quotes
  • Friendship Quotes
  • Gadgets
  • Games
  • Get Well Soon Messages
  • GIT
  • Good Morning Wishes
  • Google
  • Gratitude Quote
  • Guru Nanak Jayanti
  • Halloween
  • Happiness Quote
  • Happy Diwali Wishes
  • Happy Independence Day Wishes
  • Happy New Year Wishes
  • HTC
  • HTC One
  • HTML
  • I Miss You Messages
  • Inspirational Quotes
  • Inspirational Travel Quotes
  • Interview questions
  • IT/Software development
  • Leadership Quote
  • Life lessons
  • Love Quotes
  • Love shayari
  • Messages
  • 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 Exam AZ-220
  • Microsoft Excel
  • Microsoft Office
  • Microsoft word
  • Mobile phones
  • Motivational & Inspirational Quotes
  • Nature Quotes
  • Nexus
  • Nikon
  • Pixels
  • PL-200: Microsoft Power Platform Functional Consultant Certification
  • PL-900: Microsoft Power Platform Fundamentals
  • postman
  • Quotes
  • Robin Sharma
  • Samsung Galaxy S5
  • Self improvement quotes
  • Self-Confidence Quote
  • SonarQube
  • Sony PlayStation 4
  • SQL
  • SQL Server
  • Success Quotes
  • Travel Quotes
  • Uncategorised
  • Uplifting Quotes
  • WCF (Windows Communication Foundation)
  • Web development
  • Wishes
  • Wishes for Newborn Baby

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org



Recent Posts

  • PL-200: Microsoft Power Platform Functional Consultant Certification – Exam Practice Questions
  • SonarQube – Static code analysis
  • Microsoft PL-900 Certification Exam Practice Questions – 2
  • Microsoft AZ-204 Certification Exam Practice Questions – 1
  • AWS DevOps Engineer Professional Exam Practice Questions – 14

Recent Comments

  • Yosianus on Error while sending json model in POST request to web API service using postman
  • How to take a screenshot on Google (Android) phones? Android phones
  • The best son in the world wishes the best mother in the world the best wishes for her birthday. Happy birthday ma. Birthday Wishes For Mom
  • If there was a word in the dictionary to describe a woman as loving, wonderful, nurturing, caring and affectionate like you, I’d paint the whole world red with it. Since there is no such word, accept my humble wishes on your Happy Birthday! Birthday Wishes For Mom
  • Happy Independence Day Wishes Happy Independence Day Wishes
  • Happy birthday to my mom and thank you for everything you’ve done for me and my kids. I don’t know what I’d do without you. Thank you for teaching me to be respectful and caring adults. I couldn’t do it without you. Birthday Wishes For Mom
  • “It is only in our darkest hours that we may discover the true strength of the brilliant light within ourselves that can never, ever, be dimmed.”– Doe Zantamata Motivational & Inspirational Quotes
  • May your life be brighter As each birthday comes and goes With new happiness unfolding Like the petal of a rose Have a wonderful birthday! Birthday Wishes
  • How to read the telemetry from Azure IOT hub by Azure CLI Cloud

Copyright © 2022 Desi banjara.

Powered by PressBook News WordPress theme