忽略git log cross-branch重复项

时间:2017-07-06 09:29:51

标签: git git-log

例如,如果我执行git log -g,结果将包含许多包含相同内容的提交(例如,提交具有相同的差异,但樱桃选择到不同的分支)。我怎样才能让git log只显示其中一个提交并忽略其他具有重复差异内容的人?

1 个答案:

答案 0 :(得分:4)

我认为您需要{ "name": "qluster", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "@mapbox/polyline": "^0.2.0", "axios": "^0.16.1", "crypto-js": "^3.1.9-1", "fbjs": "^0.8.12", "minutes-seconds-milliseconds": "^1.0.3", "react": "16.0.0-alpha.6", "react-native": "0.43.3", "react-native-android-location-services-dialog-box": "^1.2.1", "react-native-camera": "git+https://github.com/lwansbrough/react-native-camera.git", "react-native-camera-roll-picker": "^1.1.9", "react-native-fbsdk": "https://github.com/kidnapkin/react-native-fbsdk.git", "react-native-fcm": "^6.2.3", "react-native-geocoder": "^0.4.8", "react-native-get-real-path": "git+https://github.com/Wraptime/react-native-get-real-path.git", "react-native-google-places": "^2.1.0", "react-native-google-places-autocomplete": "^1.2.12", "react-native-google-signin": "^0.10.0", "react-native-image-picker": "^0.26.3", "react-native-keyboard-aware-scroll-view": "^0.2.8", "react-native-maps": "^0.13.1", "react-native-masked-text": "^1.3.3", "react-native-photo-browser": "^0.2.2", "react-native-router-flux": "3.38.0", "react-native-scrollable-tab-view": "^0.7.4", "react-native-simple-radio-button": "^2.5.0-alpha.1", "react-native-snackbar": "^0.3.6", "react-native-snackbar-dialog": "^1.3.0", "react-native-star-rating": "^1.0.7", "react-native-swiper": "^1.5.4", "react-native-vector-icons": "^4.0.1", "react-redux": "^5.0.4", "redux": "^3.6.0", "redux-saga": "^0.15.0" }, "devDependencies": { "babel-jest": "19.0.0", "babel-preset-react-native": "1.9.1", "eslint-config-rallycoding": "^3.2.0", "jest": "19.0.2", "react-test-renderer": "16.0.0-alpha.6" }, "jest": { "preset": "react-native" } } 选项。在我的测试中:

--cherry-pick

使用 git log -g --format="%h %s %b" 3301841 improve readme (cherry picked from commit ...) 731e382 test 613e970 improve readme ,我只能获得3301841。

  

- cherry-pick当提交集受限于对称差异时,忽略任何在“另一方”引入相同更改的提交。