Some dev merge comments "merged x into develop" are showing up in the "staging" branch, but they were never merged there. (not directly)
My best guess is someone merged dev into a task branch and then merged that in, but I'm having difficulty tracking it down with git log.
If I came to you and said, "something is wrong with the staging branch, I merged some changes into develop only (a few days ago) and now they are showing up in staging when they shouldn't"
How would you track down what happened through git log // diff-tree // etc.
(It seems like these kind of changes can get "hidden" by the merges and are difficult to find)
If you have access to gitk
or another similar visualizer (there are several out there), gitk --all
would probably be the quickest way to identify it. git log
has a lot of options, though - git help log
is a long read, but there's quite a bit of detective work that can be done with git log
. As suggested by @Irineau, git log --graph --oneline
will give you a textual representation of what gitk
would show (I would suggest git log --graph --oneline --all
in that case, though), but in the presence of many branches, it can get a bit hard to read.
Another option would be something like git log --oneline --graph --all --merges
, or git log --oneline --graph --all --merges --ancestry-path <bad_sha_from_dev>..staging
. A lot depends on exactly what you need to find and how you want it presented...
也许您可以使用git-log
的--graph
选项跟踪发生了什么:
git log --graph --oneline
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.