第 20 天:修正 commit 過的版本歷史紀錄 Part 2
準備本日練習用的版本庫
mkdir git-revert-demo
cd git-revert-demo
git init
echo 1 > a.txt
git add .
git commit -m "Initial commit (a.txt created)"
echo 2 > a.txt
git add .
git commit -m "Update a.txt!"
echo 1 > b.txt
git add .
git commit -m "Add b.txt!"
使用 git revert 命令
git revert 命令



使用 git revert 命令失敗的情況
git revert 命令失敗的情況





使用 git revert 命令套用變更,但不執行 commit 動作
git revert 命令套用變更,但不執行 commit 動作

今日小結
Last updated