第 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