The answer is --pretty=format:%H. E.g.
git log --reverse --pretty=format:%H my-branch-created-from-maintenance..my-branch-created-from-master
Useful in some ad-hoc scripts.
Suppose there are some changes on maintenance branch you do not want on master (yet?). You have created a branch from maintenance and made some local commits there. Now it turns out they should be commited on master, not maintenance. If you rebase on master, the unwanted changes will be present there. So:
for hash in $(git log --reverse --pretty=format:%H my-branch-created-from-maintenance..my-branch-created-from-master)
do
git cherry-pick $hash
done
Actually, I think there is some nicer way of doing it...
Brak komentarzy:
Prześlij komentarz