{"id":18038,"date":"2024-11-28T15:32:13","date_gmt":"2024-11-28T15:32:13","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=18038"},"modified":"2024-12-02T11:32:37","modified_gmt":"2024-12-02T11:32:37","slug":"list-my-remote-branches-git","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=18038","title":{"rendered":"List my remote branches (Git)"},"content":{"rendered":"<p><strong>Command<\/strong><\/p>\n<p>The following command prints the remote branch names, where you are the author of the last pushed commit.<\/p>\n<pre>\r\n$ git branch -r | xargs -L1 git show -s --oneline --author=\"$(git config user.name)\" --format=\"%D\"\r\n<\/pre>\n<hr>\n<p><strong>Explanation<\/strong><\/p>\n<ul>\n<li>git branch -r &#8230; Lists all remote branches in the repository<\/li>\n<li>xargs -L1 &#8230; Forwards output linewise to the next input<\/li>\n<li>git show -s &#8230; Shows commit details with suppressed diff<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Command The following command prints the remote branch names, where you are the author of the last pushed commit. $<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18038"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18038"}],"version-history":[{"count":18,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18038\/revisions"}],"predecessor-version":[{"id":18063,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18038\/revisions\/18063"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18038"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}