{"id":128,"date":"2011-09-01T18:23:34","date_gmt":"2011-09-01T10:23:34","guid":{"rendered":"http:\/\/karyleong.net\/?p=128"},"modified":"2011-09-01T18:23:34","modified_gmt":"2011-09-01T10:23:34","slug":"git-notes","status":"publish","type":"post","link":"https:\/\/karyleong.net\/?p=128","title":{"rendered":"Git notes"},"content":{"rendered":"<pre>delete branch remotely\r\n\r\nto delete local\/remote branch \"newfeature\":\r\n\r\nlocal:\r\ngit branch -d newfeature\r\n\r\nremote:\r\ngit push origin :newfeature\r\n\r\nexport changed file of last commit to tar:\r\ngit diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD | xargs tar czvf last_commit.tar.gz\r\n\r\nexport changed file between two commit\r\ngit diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT tag1 tag2 | xargs tar czvf last_commit.tar.gz \r\n\r\n\r\nlast commit deleted files\r\ngit diff-tree -r --no-commit-id --name-only --diff-filter=D HEAD<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>delete branch remotely to delete local\/remote branch &#8220;newfeature&#8221;: local: git branch -d newfeature remote: git push origin :newfeature export changed file of last commit to tar: git diff-tree -r &#8211;no-commit-id &#8211;name-only &#8211;diff-filter=ACMRT HEAD | xargs tar czvf last_commit.tar.gz export changed file between two commit git diff-tree -r &#8211;no-commit-id &#8211;name-only &#8211;diff-filter=ACMRT tag1 tag2 | xargs tar &#8230; <a title=\"Git notes\" class=\"read-more\" href=\"https:\/\/karyleong.net\/?p=128\" aria-label=\"More on Git notes\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[66],"tags":[],"_links":{"self":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts\/128"}],"collection":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=128"}],"version-history":[{"count":2,"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":130,"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts\/128\/revisions\/130"}],"wp:attachment":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}