{"id":1225,"date":"2025-12-02T18:56:03","date_gmt":"2025-12-02T10:56:03","guid":{"rendered":"https:\/\/virtualcardx.com\/?p=1225"},"modified":"2026-07-07T00:30:05","modified_gmt":"2026-07-06T16:30:05","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;\" 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\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure>\n<p class=\"wp-block-paragraph\">\n<h2 class=\"wp-block-heading\" id=\"github-\">1. Initial operations<\/h2>\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<h2 class=\"wp-block-heading\" id=\"2-\">2. How to set up proxy access to Github<\/h2>\n<h4 class=\"wp-block-heading\" id=\"-\">Global Proxy Settings<\/h4>\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<h4 class=\"wp-block-heading\" id=\"-github-\">Proxying GitHub only<\/h4>\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<h4 class=\"wp-block-heading\" id=\"sock5-\">sock5 proxy settings<\/h4>\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<h4 class=\"wp-block-heading\" id=\"-\">Unproxy<\/h4>\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<h4 class=\"wp-block-heading\" id=\"-\">Viewing existing configurations<\/h4>\n<pre class=\"wp-block-code\"><code>git config --global -l<\/code><\/pre>\n<hr \/>\n<section id=\"vcx-seo-expansion-20260704\">\n<h2>Summary of How to Push Code to GitHub: A Checklist Before You Begin<\/h2>\n<p>When creating technical tutorials, the biggest pitfall is copying commands verbatim while ignoring differences in the environment. Different system versions, web servers, plugin combinations, and permission settings can all affect the final outcome. Before proceeding, it\u2019s recommended that you document your current configuration and, if necessary, create a snapshot or backup. That way, even if you make a mistake during the process, you can quickly roll back the changes.<\/p>\n<h3>We recommend confirming the following before proceeding<\/h3>\n<ul>\n<li><strong>System and Software Versions:<\/strong>Verify the versions of Windows, Debian, Nginx, Apache, WordPress, or related tools.<\/li>\n<li><strong>Permissions:<\/strong>When dealing with credentials, certificates, or configuration files, first verify that the current user has sufficient permissions.<\/li>\n<li><strong>Backup:<\/strong>Before modifying a configuration file, make a copy of the original file first. For WordPress sites, it\u2019s also recommended to back up the database.<\/li>\n<li><strong>Test Method:<\/strong>Validate your changes after each step; don't wait until you've finished making all the changes to troubleshoot.<\/li>\n<\/ul>\n<h3>Troubleshooting Approach<\/h3>\n<p>When you encounter an error, first determine at which layer it occurred: the browser, DNS, server, application, plugin, or permissions. Breaking the problem down into smaller parts is more effective than repeatedly searching through an entire error message. For issues involving WordPress, Nginx, certificates, and proxies, logs are usually more reliable than front-end pages.<\/p>\n<p>If the paths or menus in this tutorial differ from those in your environment, refer to your system\u2019s current display first, and then use the keywords to locate the corresponding features. This is especially true for the Windows Control Panel, the WordPress plugin menu, and cloud service consoles, as their access points are frequently updated with new versions.<\/p>\n<h3>Recommendations for Follow-up Maintenance<\/h3>\n<p>Completing a fix does not mean the problem is permanently resolved. We recommend documenting key commands, modified files, modification times, and verification results. These records can save a significant amount of troubleshooting time when you later migrate servers, upgrade plugins, or change themes.<\/p>\n<h3>Related Content<\/h3>\n<ul>\n<li><a href=\"https:\/\/virtualcardx.com\/en\/technology-share\/\">Technology Sharing<\/a><\/li>\n<li><a href=\"https:\/\/virtualcardx.com\/en\/technology-share\/wordpress\/\">WordPress Tutorials<\/a><\/li>\n<li><a href=\"https:\/\/virtualcardx.com\/en\/technology-share\/seo\/\">SEO techniques<\/a><\/li>\n<\/ul>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>A Complete Guide to Committing Code on GitHub: A comprehensive overview covering everything from setting up your environment to committing and pushing, ideal for beginner developers looking to quickly master the Git workflow.<\/p>","protected":false},"author":1,"featured_media":1226,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[50],"class_list":["post-1225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology-share","tag-tech-tutorial","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":8,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1225\/revisions"}],"predecessor-version":[{"id":2452,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1225\/revisions\/2452"}],"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}]}}