Summary of Github code submission methods

github

1. Initial operations

echo "# supereditor" >> README.md

git init # initialize repository

git add README.md # add single file Omitting the filename at the end is adding all files

git config --global user.name xxx # configure git

git commit -m "first commit" # commits changes from the staging area to the local repository with a commit note

git branch -M main # Forces the current branch or a specified branch to be renamed to main.

git remote add origin https://github.com/xxx/xxx.git # associates the remote repository for the first time

git push -u origin main # push code

2. How to set up proxy access to Github

Global Proxy Settings

git config --global http.proxy http://127.0.0.1:1080

git config --global https.proxy https://127.0.0.1:1080

Proxying GitHub only

git config --global http.https://github.com.proxy https://127.0.0.1:1080

git config --global https.https://github.com.proxy https://127.0.0.1:1080

sock5 proxy settings

git config --global http.https://github.com.proxy socks5://127.0.0.1:1086

git config --global https.https://github.com.proxy socks5://127.0.0.1:1086

Unproxy

git config --global --unset http.https://github.com.proxy

git config --global --unset http.https://github.com.proxy

Viewing existing configurations

git config --global -l

Summary of How to Push Code to GitHub: A Checklist Before You Begin

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’s 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.

We recommend confirming the following before proceeding

  • System and Software Versions:Verify the versions of Windows, Debian, Nginx, Apache, WordPress, or related tools.
  • Permissions:When dealing with credentials, certificates, or configuration files, first verify that the current user has sufficient permissions.
  • Backup:Before modifying a configuration file, make a copy of the original file first. For WordPress sites, it’s also recommended to back up the database.
  • Test Method:Validate your changes after each step; don't wait until you've finished making all the changes to troubleshoot.

Troubleshooting Approach

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.

If the paths or menus in this tutorial differ from those in your environment, refer to your system’s 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.

Recommendations for Follow-up Maintenance

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.

Related Content

en_USEnglish