git init
git config --global user.name "Di Xu"
git config --global user.email"dixu@nbai.io"
git remote add origin https://github.com/sayboy/tutorial.git
git remote -v
git add readme.md
git add .
git add --all
git restore --staged <file>
git commit -m "added readme.md"
git push origin master -u
git push
git clone https://github.com/sayboy/tutorial.git tutorial-demo
git pull origin master
git pull
git branch -a
git branch feature1
git checkout feature1
git checkout -b feature3
git checkout -d feature3
git checkout -D feature3
git merge feature4
git merge f1
git merge f1 --no-ff
*git rebase
git mergetool
git reset master^
git reset master^^
git reset master~5
git status
git reset [id]
git revert^
git revert^^
git revert~5
git push origin feature1
git push origin :feature1
git log
git log --oneline
git log --oneline -3/-5
git show [id]
git log --all --decorate --oneline --graph
touch .gitignore
https://www.gitignore.io
git remote add upstream https://github.com/YerongAI/Office-Tool.git
git fetch upstream
git fetch upstream dev
git branch
git branch -r
git rebase upstream/main æ— è´¡çŒ®ä½¿ç”¨
git merge upstream/main 有贡献使用
git log
git clone https://github.com/YerongAI/Office-Tool.git
git clone git@github.com:YerongAI/Office-Tool.git
$ ssh-keygen -t ed25519 -C "sayboy@outlook.com"
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_ed25519
git clone git@github.com:sayboy/tutorial.git tutuaial-ssh