如何拉动我的倒数第二个或倒数第 n 个推力
How to pull my second last or n'th last push
当我运行git log
时,我看到:
commit d0fa4410393w92ce6ede2ea26fa2fb74z2e5f1bz (HEAD -> notificationControls, origin/notificationControls)
Author: stufezic-dev <ninjahero@gmail.com>
Date: Sat Sep 19 12:32:45 2020 +0545
lockscreen controls working, notification updates yet to fix
commit 2e11d85350a741d6992875e949a0a77abbeb8fde (mainadjust, commitBranch)
Author: stufezic-dev <ninjahero@gmail.com>
Date: Tue Sep 15 23:30:27 2020 +0545
notification and lockscreen controls using mediaSession: initiated
commit 2e11d85350a741d6992875e949a0a77abbeb8fde (mainadjust, commitBranch)
Author: stufezic-dev <ninjahero@gmail.com>
Date: Tue Sep 14 23:30:27 2020 +0545
notification and lockscreen controls using mediaSession: initiated
...
如何提取倒数第二个或倒数第三个提交,而不是最新的提交?我只知道 1 个命令:git pull master origin
,我正在考虑如何提取任何提交而不是最新的提交。
git pull origin master
等同于 git fetch origin
,后跟 git merge origin/master
.
如果你想在你的分支中合并 origin/master
以外的东西(比如:origin/master
之前的第三次提交),请使用 git fetch
而不是 git pull
:
git fetch
# inspect the history
git log --graph origin/master HEAD
# merge whatever commit you want into your branch
git merge eacf32
当我运行git log
时,我看到:
commit d0fa4410393w92ce6ede2ea26fa2fb74z2e5f1bz (HEAD -> notificationControls, origin/notificationControls)
Author: stufezic-dev <ninjahero@gmail.com>
Date: Sat Sep 19 12:32:45 2020 +0545
lockscreen controls working, notification updates yet to fix
commit 2e11d85350a741d6992875e949a0a77abbeb8fde (mainadjust, commitBranch)
Author: stufezic-dev <ninjahero@gmail.com>
Date: Tue Sep 15 23:30:27 2020 +0545
notification and lockscreen controls using mediaSession: initiated
commit 2e11d85350a741d6992875e949a0a77abbeb8fde (mainadjust, commitBranch)
Author: stufezic-dev <ninjahero@gmail.com>
Date: Tue Sep 14 23:30:27 2020 +0545
notification and lockscreen controls using mediaSession: initiated
...
如何提取倒数第二个或倒数第三个提交,而不是最新的提交?我只知道 1 个命令:git pull master origin
,我正在考虑如何提取任何提交而不是最新的提交。
git pull origin master
等同于 git fetch origin
,后跟 git merge origin/master
.
如果你想在你的分支中合并 origin/master
以外的东西(比如:origin/master
之前的第三次提交),请使用 git fetch
而不是 git pull
:
git fetch
# inspect the history
git log --graph origin/master HEAD
# merge whatever commit you want into your branch
git merge eacf32