第 21 天:修正 commit 過的版本歷史紀錄 Part 3
準備本日練習用的版本庫
mkdir git-cherry-pick-demo
cd git-cherry-pick-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 to 2!"
git checkout -b branch1
echo 3 > a.txt
git add .
git commit -m "Update a.txt to 3!"
echo b > b.txt
git add .
git commit -m "Add b.txt!"
echo 4 > a.txt
git add .
git commit -m "Update a.txt to 4!"
git checkout master
echo 3 > a.txt
git add .
git commit -m "Update a.txt to 3!"

使用 git cherry-pick 命令的注意事項
git cherry-pick 命令的注意事項使用 git cherry-pick 命令
git cherry-pick 命令

使用 git cherry-pick 命令的其他參數
git cherry-pick 命令的其他參數
今日小結
Last updated