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
en_USEnglish