-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Magic rebase
Ilya Zverev edited this page Feb 16, 2016
·
2 revisions
[14.01.16, 13:45:38] Alex Zolotarev:
Ребята, есть волшебная команда, сильно помогающая ребейзить. Если у вас есть парочка локальных коммитов, и вы хотите только их перенести на свежеотребейженную ветку osm-editor
, то для этого нужно сделать
git checkout вашаветка
git rebase --onto osm-editor хэш_коммита_перед_вашими_коммитами
Про —onto
подробнее написано тут: https://git-scm.com/docs/git-rebase
$ git branch --contains
* hierarchy_version
$ git log --oneline | head -n 6
16443d4 [generator] Use version from the planet file
a7b6a28 [generator] Add version parameter to planet generator
ab71dc8 Merge pull request #1404 from bykoianko/map-downloader-removing-TDownloadCountryListener
1bc3bbc Removing TDownloadCountryListener type and SetDownloadCountryListener method.
413f2d2 Merge pull request #1379 from trashkalmar/new-downloader-jni-layer
831e191 [android] fix: Code review fixes №2.
$ git fetch upstream
From github.com:mapsme/omim
+ 69752c5...9a17947 map-downloader -> upstream/map-downloader (forced update)
$ git log --oneline upstream/map-downloader | head -n 8
9a17947 Merge pull request #1412 from trashkalmar/build-fix
0a20c84 [android] fix: Build error after merge.
dde90fd [ios] Updated implementation for LocalNotificationManager.
19db8c2 Defining vector<TCountryId> as TCountriesVec.
05c0200 Review fixes. The second part.
11975d7 Removing TDownloadCountryListener type and SetDownloadCountryListener method.
08f47f9 [android] fix: Code review fixes №2.
7fdd3fd [android] fix: Code review fixes №1.
$ git rebase --onto upstream/map-downloader ab71dc8
First, rewinding head to replay your work on top of it...
Applying: [generator] Add version parameter to planet generator
Applying: [generator] Use version from the planet file
$ git log --oneline | head -n 4
1abd7d6 [generator] Use version from the planet file
e4dfcc6 [generator] Add version parameter to planet generator
9a17947 Merge pull request #1412 from trashkalmar/build-fix
0a20c84 [android] fix: Build error after merge.
$ git push --force origin hierarchy_version
To [email protected]:Zverik/omim.git
+ 16443d4...1abd7d6 hierarchy_version -> hierarchy_version (forced update)