git clone 下載目標檔案
git clone https://github.com/D-Sketon/hexo-theme-reimu.git
git clone https://github.com/D-Sketon/reimu-template
查看歷史
git log
git log --perl-regexp --author='^(?!picoCTF <ops@picoctf\.com>).*$'
切換到
git switch --detach b562f0b425907789d11d2fe2793e67592dc6be93
git switch master
git switch feature/part-1
顯示分支
git branch
git教學
git remote remove origin
git remote add origin git@github.com:itamiokanjiro/video-play.git
git remote set-url origin git@github.com:itamiokanjiro/video-play.git
產生金鑰
ssh-keygen -t rsa -b 4096 -C "a234123234a@gmail.com"
cat ~/.ssh/id_rsa.pub
ssh-keygen -t ed25519 -C "a234123234a@gmail.com"
cat ~/.ssh/id_ed25519.pub
空更新
git commit --allow-empty -m "trigger snake update"
git push origin main
設定作者
git config --global user.name "itamiokanjiro"
git config user.name "你的 GitHub 使用者名稱"
設定信箱
git config user.email "a234123234a@gmail.com"
查看修改 狀況
git status
刪除跟蹤
git rm -r --cached 跟CTF無關/
初始化
git init
git branch -m main
git add .
git commit -m "影片撥放器"
推送遠端
git push -u origin main
更新用
git commit -m "更新"
測試連接
ssh -T git@github.com
刪除儲存
git rm -r --cached HEXO
.gitignore 新增
HEXO/
刪除.git
rm -rf themes/reimu/.git
這啥
git status
git push
刪除連接
git rm --cached themes/reimu
rm -rf .gitmodules
git submodule update
git add themes/reimu
git commit -m "更新"
git push
查看目前
git rev-parse --show-toplevel
查找
find /home/hacker123/kok/CTF/HEXO -name ".git" -type d
git push -u origin main --force
移除
git rm --cached db.js
安裝過濾器
sudo apt install git-filter-repo
git filter-repo --path db.js --invert-paths
git push origin main --force
dir %USERPROFILE%.ssh\
ssh-keygen -t rsa -b 4096 -C “a234123234a@gmail.com“
由於本尊github被封了
ssh-keygen -t ed25519 -C "a123asd123asd1@gmail.com"
id_rsa
nano ~/.ssh/config
GitHub 帳號 1
Host github-account1
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
GitHub 帳號 2
Host github-account2
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
下載
git clone git@github-account1:your_account1/repo-a.git
git clone git@github-account2:your_account2/repo-b.git
設定遠端
git remote remove origin
git remote add origin git@github-account2:kokoyori-sekainiitamio/chatgpt-Discord.git
git remote set-url origin git@github-account2:kokoyori-sekainiitamio/chatgpt-Discord.git
設定作者
git config --global user.name "kokoyori-sekainiitamio"
git config user.name "你的 GitHub 使用者名稱"
設定信箱
git config user.email "a123asd123asd1@gmail.com"
git commit -m "自介"
ssh -T git@github-account2
rm ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub
cat ls ~/.ssh/id_ed25519.pub
git config user.name “kokoyori-sekainiitamio”
git config user.email “a123asd123asd1@gmail.com“
find /home/hacker123/kok/CTF/HEXO/ -name “.git” -type d
/home/hacker123/kok/CTF/HEXO/themes/reimu/.git
/home/hacker123/kok/CTF/HEXO/.git
666666
ssh-keygen -t rsa -b 4096 -C “a123asd123asd1@gmail.com“ -f ~/.ssh/id_rsa_user2
git clone git@github-account1:kokoyori-sekainiitamio/RC-SERVER-TEST.git
git remote remove origin
git remote add origin git@github-account1:itamiokanjiro/itamiokanjiro.git
git remote set-url origin git@github-account1:itamiokanjiro/itamiokanjiro.git
git remote add origin git@github-account2:Genshin-Discord-Bot/Genshin-Discord-Bot.git
git remote set-url origin git@github-account2:kokoyori-sekainiitamio/Genshin-Discord-Bot.git
ssh -T git@github-account2
git checkout -b Websocket
git push -u origin Websocket