How to not import all the messages of upstream when I do a
git merge upstream/master
git push origin master
I just need a message "merged from upstream"
Is rebase after the push the only option?
If you want a merge commit (not a rebase), you can override the default commit messsage.
Option 1: Set commit message when you merge:
git merge upstream/master -m "Your commit message"
Option 2: Open up an editor when merging
git merge upstream/master --edit
Option 3: Merge without committing, then commit with your own message
git merge upstream/master --no-commit
git commit -m "Your commit message"
Third option lets you look at the merge result before actually committing. You could make further modifications if you wanted to (although I always avoid doing that, I prefer to add an extra commit after the merge).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.