https://learngitbranching.js.org/
‣
Git global user setup
git config --global user.name "yaoyao_qiekn"
git config --global user.email "[email protected]"
Create a new repository
git clone [email protected]:yaoyao_qiekn/xv6-labs.git
cd xv6-labs
git switch --create main
touch README.md
git add README.md
git commit -m "add README"
git push --set-upstream origin main
Push an existing folder
cd existing_folder
git init --initial-branch=main
git remote add origin [email protected]:yaoyao_qiekn/xv6-labs.git
git add .
git commit -m "Initial commit"
git push --set-upstream origin main
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin [email protected]:yaoyao_qiekn/xv6-labs.git
git push --set-upstream origin --all
git push --set-upstream origin --tags
git config --global --list 查看全局配置
git config --global user.name "yaoyao_qiekn" # your student ID and name
git config --global user.email "[email protected]" # your email
git config --global core.editor vim # your favorite editor
git config --global color.ui true
git config --global https.proxy <http://127.0.0.1:7890>
git config user.name "qiekn"
git config user.email "[email protected]"