{"id":8588,"date":"2020-01-10T11:52:35","date_gmt":"2020-01-10T11:52:35","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=8588"},"modified":"2021-11-15T06:08:53","modified_gmt":"2021-11-15T06:08:53","slug":"git-interview-questions-and-answer-part-9","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/git-interview-questions-and-answer-part-9\/","title":{"rendered":"Git Interview Questions and Answer Part \u2013 9"},"content":{"rendered":"\n<p><strong>Which section of GitHub can you use to track tasks? (Not Include in Questions)*<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Issues (Ans)<\/strong><\/li><li>Pages<\/li><li>Pages<\/li><li>Pages<\/li><li>Work Items<\/li><\/ul>\n\n\n\n<p><strong>Which operation in GitHub for Windows will automatically commit a new change to your local repository that does the opposite changes of a previous commit, effectively eliminating a previous commit?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>roll back<\/li><li>undo<\/li><li><strong>revert (Ans)<\/strong><\/li><li>reverse<\/li><\/ul>\n\n\n\n<p><strong>Which of these can you change in your GitHub for Windows Options window?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>default diff viewer<\/li><li>push behavior<\/li><li><strong>default storage directory (Ans)<\/strong><\/li><li>default repository name<\/li><li>sync refresh timing<\/li><\/ul>\n\n\n\n<p><strong>Which operation will combine two branches by changing the order of the commits such that one branch now appears to have happened after the other?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Combine <\/li><li>Merge<\/li><li>Reconstitute<\/li><li><strong>Rebase (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What happens if you are viewing a GitHub repository in your browser and drag the URL directly into the GitHub for Windows application?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It creates a fork of the repository in GitHub.<\/li><li>A bookmark is stored in GitHub for Windows.<\/li><li>A zip file of the repository is downloaded.<\/li><li><strong>The repository is cloned and tracked locally. (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which of these was NOT mentioned as a common rule for rebasing?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Never Rebase after Fetching a Branch (Ans)<\/strong><\/li><li>Never Rebase after Commits use your Branch<\/li><li>Never Rebase after Pushing a Branch<\/li><li>Never Rebase after Pulling someone else&#8217;s Branch<\/li><\/ul>\n\n\n\n<p><strong>What does forking a repository let you do?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Have your own copy of the repository to modify. (Ans)<\/strong><\/li><li>Keep track of a repository that you&#8217;re interested in.<\/li><li>Stop future changes from being made to that repository.<\/li><\/ul>\n\n\n\n<p><strong>When tracking down the problem with an open issue, what option did I show that the resolver can use to communicate with the creator of the open issue?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Email the user from their profile.    <\/li><li><strong>Comment on the issue itself. (Ans<\/strong>)<\/li><li>Send a git message to the user.<\/li><\/ul>\n\n\n\n<p><strong>What is the name of GitHub&#8217;s native GUI application?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>GitUI<\/li><li><strong>GitHub for Windows (Ans)<\/strong><\/li><li>GitX<\/li><li>GitHub<\/li><\/ul>\n\n\n\n<p><strong>Which command can be used to get your stashed changes back?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>git stash get<\/li><li>git stash pull<\/li><li><strong>git stash pop (Ans)<\/strong><\/li><li>git stash<\/li><\/ul>\n\n\n\n<p><strong>How do you associate a TFS Work Item to a Git commit?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>From Team Explorer, add the Work Item under the Related Work Items section<\/li><li>From Command-line, add the Work Item ID to the commit message, with a hashtag in front of it<\/li><li>From Team Explorer, add the Work Item ID to the commit message with a hashtag in front of it<\/li><li><strong>All of the above (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What are the qualities of a good commit that together make up the acronym ACID?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Atomic, compact, irreversible and durable<\/li><li><strong>Atomic, consistent, incremental and documented (Ans)<\/strong><\/li><li>Additional, concise, isolated and documented<\/li><li>Atomic, consistent, isolated and durable<\/li><\/ul>\n\n\n\n<p><strong>What does the two-dot notation, A..B mean when used with git log?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>It includes all the commits reachable from B, but not from A. (Ans)<\/strong><\/li><li>It includes all the commits reachable from A, but not from B.<\/li><li>It includes all the commits reachable from both A or B.<\/li><li>It includes all the commits reachable from either A or B.<\/li><\/ul>\n\n\n\n<p><strong>What does the three-dot notation, A\u2026B, mean when used with git log?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It includes all the commits reachable from either A or B.<\/li><li>It includes all the commits reachable from both A and B.<\/li><li><strong>It includes all the commits reachable from either A or B, but not both. (Ans)<\/strong><\/li><li>It includes all the commits reachable from neither A nor B.<\/li><\/ul>\n\n\n\n<p><strong>What is the difference between the &#8211;mixed and &#8211;soft options of git reset?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&#8211;mixed modifies both the index and the working directory, while &#8211;soft modifies only the index.<\/li><li>&#8211;mixed modifies only the working directory, while &#8211;soft modifies only the index.<\/li><li><strong>&#8211;mixed modifies only the index, while &#8211;soft doesn&#8217;t modify anything. (Ans)<\/strong><\/li><li>&#8211;mixed modifies only the working directory, while &#8211;soft doesn&#8217;t modify anything.<\/li><\/ul>\n\n\n\n<p><strong>Git Source Control Provider only works with Visual Studio 2010.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>True<\/li><li><strong>False (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Git creates a separate folder for each branch that you create.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>True (Ans)<\/strong><\/li><li>False<\/li><\/ul>\n\n\n\n<p>Git Tutorials | Github Tutorials | Git using Github Crash Course<\/p>\n\n\n\n<p><a href=\"https:\/\/bit.ly\/2Un3W4i\">https:\/\/bit.ly\/2Un3W4i<\/a><\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_42148\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_55350\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_42148\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Which section of GitHub can you use to track tasks? (Not Include in Questions)* Issues (Ans) Pages Pages Pages Work Items Which operation in GitHub for Windows&#8230; <\/p>\n","protected":false},"author":1,"featured_media":8613,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[38,5204,5112],"tags":[160,404],"class_list":["post-8588","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-git","category-github","category-gitlab","tag-git","tag-gitlab"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=8588"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8588\/revisions"}],"predecessor-version":[{"id":25176,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8588\/revisions\/25176"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/8613"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=8588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=8588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=8588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}