{"id":1225,"date":"2025-12-02T18:56:03","date_gmt":"2025-12-02T10:56:03","guid":{"rendered":"https:\/\/virtualcardx.com\/?p=1225"},"modified":"2025-12-02T19:03:16","modified_gmt":"2025-12-02T11:03:16","slug":"github-commit-code-commands-summary","status":"publish","type":"post","link":"https:\/\/virtualcardx.com\/en\/2025\/12\/02\/github-commit-code-commands-summary\/","title":{"rendered":"Summary of Github code submission methods"},"content":{"rendered":"<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"750\" height=\"473\" data-src=\"https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/12\/github.jpg\" alt=\"\" class=\"wp-image-1226 lazyload\" title=\"\" data-srcset=\"https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/12\/github.jpg 750w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/12\/github-300x189.jpg 300w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/12\/github-18x12.jpg 18w\" data-sizes=\"(max-width: 750px) 100vw, 750px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 750px; --smush-placeholder-aspect-ratio: 750\/473;\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"github-\">1. Initial operations<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"# supereditor\" &gt;&gt; README.md\n\ngit init # initialize repository\n\ngit add README.md # add single file Omitting the filename at the end is adding all files\n\ngit config --global user.name xxx # configure git\n\ngit commit -m \"first commit\" # commits changes from the staging area to the local repository with a commit note\n\ngit branch -M main # Forces the current branch or a specified branch to be renamed to main.\n\ngit remote add origin https:\/\/github.com\/xxx\/xxx.git # associates the remote repository for the first time\n\ngit push -u origin main # push code<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-\">2. How to set up proxy access to Github<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"-\">Global Proxy Settings<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global http.proxy http:\/\/127.0.0.1:1080\n\ngit config --global https.proxy https:\/\/127.0.0.1:1080<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"-github-\">Proxying GitHub only<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global http.https:\/\/github.com.proxy https:\/\/127.0.0.1:1080\n\ngit config --global https.https:\/\/github.com.proxy https:\/\/127.0.0.1:1080<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"sock5-\">sock5 proxy settings<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global http.https:\/\/github.com.proxy socks5:\/\/127.0.0.1:1086\n\ngit config --global https.https:\/\/github.com.proxy socks5:\/\/127.0.0.1:1086<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"-\">Unproxy<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global --unset http.https:\/\/github.com.proxy\n\ngit config --global --unset http.https:\/\/github.com.proxy<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"-\">Viewing existing configurations<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global -l<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>1. \u521d\u59cb\u64cd\u4f5c 2. \u5982\u4f55\u8bbe\u7f6e\u4ee3\u7406\u8bbf\u95eeG &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Summary of Github code submission methods\" class=\"read-more button\" href=\"https:\/\/virtualcardx.com\/en\/2025\/12\/02\/github-commit-code-commands-summary\/#more-1225\" aria-label=\"Read more about Github\u63d0\u4ea4\u4ee3\u7801\u65b9\u6cd5\u603b\u7ed3\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":1226,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology-share","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/comments?post=1225"}],"version-history":[{"count":0,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1225\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media\/1226"}],"wp:attachment":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media?parent=1225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/categories?post=1225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/tags?post=1225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}