Suppose I:
Once I enter git log -1 on branch B, I can see that the date is the original one in which the file was pushed to branch A.
So how can I determine the cherry pick date?
Thanks,
Qwerty
In order to cherry-pick changes, you will need to identify your commit hashes. In order to see the commit hashes for your current branch, simply run the “git log” command with the “–oneline” option in order to make it more readable.
According to the Git docs the action of the git cherry-check command is to "Apply the changes introduced by some existing commits". Notice the use of the phrase apply changes rather than merge changes. Cherry picking will not preserve history exactly how it is represented from the source.
git cherry-pick is a powerful command that enables arbitrary Git commits to be picked by reference and appended to the current working HEAD. Cherry picking is the act of picking a commit from a branch and applying it to another. git cherry-pick can be useful for undoing changes.
Absolutely, commit order matters. If commit B modifies stuff that was first introduced in commit A, then you can't apply commit B until commit A has been applied.
A git commit has two dates. One is the author date and the other is the commit date. The default display is the author date. You want the commit date. git log -1 --pretty=fuller
will show that or you can use %cD in a log format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With