i' d like to get all the commit messages (like with git log --format=%s) on a newly created branch. Let' s suppose i' ve 2 commits:
abcd - from yesterday
bcde - from today
. With this code:
while read old new ref; do
....
done
old will be 40 zeros, and new will be bcde. How can i get all the commit messages in this case?
Usecase:
git checkout master
git checkout -b new_branch
some_work
git add; git commit
some_other_work
git add; git commit
git push origin new_branch
.
Many thanks.