{"id":3786,"date":"2023-06-14T19:01:10","date_gmt":"2023-06-14T19:01:10","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=3786"},"modified":"2023-06-14T19:01:10","modified_gmt":"2023-06-14T19:01:10","slug":"git-branch-information-and-status-on-linux-command-prompt","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=3786","title":{"rendered":"Git Branch Information and Status on Linux Command Prompt"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When working with Git repositories on the Linux command line, it can often be helpful to see the branch on which you are using at the command prompt, rather than having to identify the branch via a command like &#8220;git branch&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install it just run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -sS https:\/\/raw.githubusercontent.com\/diogocavilha\/fancy-git\/master\/install.sh | bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then logout and back in again to reload your bash configuration. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/06\/image-8-1024x575.png\" alt=\"\" class=\"wp-image-3790\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/06\/image-8-1024x575.png 1024w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/06\/image-8-300x168.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/06\/image-8-768x431.png 768w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2023\/06\/image-8.png 1298w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So if you cd into a directory that is git initialised, you&#8217;ll see the branch currently selected at the command prompt. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s loads more you can do fancy-git but that&#8217;s for another time!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with Git repositories on the Linux command line, it can often be helpful to see the branch on which you are using at the command prompt, rather than having to identify the branch via a command like &#8220;git branch&#8221;. To install it just run: Then logout and back in again to reload your &#8230; <a title=\"Git Branch Information and Status on Linux Command Prompt\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=3786\" aria-label=\"Read more about Git Branch Information and Status on Linux Command Prompt\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,20],"tags":[],"class_list":["post-3786","post","type-post","status-publish","format-standard","hentry","category-devops","category-random"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3786"}],"version-history":[{"count":3,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3786\/revisions"}],"predecessor-version":[{"id":3791,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3786\/revisions\/3791"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}