Skip to content

Commit 67a61e4

Browse files
committed
Add new command "Move commits to new branch"
1 parent 0659c2b commit 67a61e4

19 files changed

+318
-0
lines changed

docs/Config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ keybinding:
557557
rebaseBranch: r
558558
renameBranch: R
559559
mergeIntoCurrentBranch: M
560+
moveCommitsToNewBranch: "N"
560561
viewGitFlowOptions: i
561562
fastForward: f
562563
createTag: T

docs/keybindings/Keybindings_en.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ If you would instead like to start an interactive rebase from the selected commi
105105
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
106106
| `` o `` | Open commit in browser | |
107107
| `` n `` | Create new branch off of commit | |
108+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
109+
110+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
108111
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
109112
| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
110113
| `` <c-t> `` | Open external diff tool (git difftool) | |
@@ -157,6 +160,9 @@ If you would instead like to start an interactive rebase from the selected commi
157160
| `` i `` | Show git-flow options | |
158161
| `` <space> `` | Checkout | Checkout selected item. |
159162
| `` n `` | New branch | |
163+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
164+
165+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
160166
| `` o `` | Create pull request | |
161167
| `` O `` | View create pull request options | |
162168
| `` <c-y> `` | Copy pull request URL to clipboard | |
@@ -253,6 +259,9 @@ If you would instead like to start an interactive rebase from the selected commi
253259
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
254260
| `` o `` | Open commit in browser | |
255261
| `` n `` | Create new branch off of commit | |
262+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
263+
264+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
256265
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
257266
| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
258267
| `` <c-r> `` | Reset copied (cherry-picked) commits selection | |
@@ -322,6 +331,9 @@ If you would instead like to start an interactive rebase from the selected commi
322331
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
323332
| `` o `` | Open commit in browser | |
324333
| `` n `` | Create new branch off of commit | |
334+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
335+
336+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
325337
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
326338
| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
327339
| `` <c-r> `` | Reset copied (cherry-picked) commits selection | |

docs/keybindings/Keybindings_ja.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
7373
| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
7474
| `` o `` | ブラウザでコミットを開く | |
7575
| `` n `` | コミットにブランチを作成 | |
76+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
77+
78+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
7679
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
7780
| `` C `` | コミットをコピー (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
7881
| `` <c-r> `` | Reset copied (cherry-picked) commits selection | |
@@ -122,6 +125,9 @@ If you would instead like to start an interactive rebase from the selected commi
122125
| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
123126
| `` o `` | ブラウザでコミットを開く | |
124127
| `` n `` | コミットにブランチを作成 | |
128+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
129+
130+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
125131
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
126132
| `` C `` | コミットをコピー (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
127133
| `` <c-t> `` | Open external diff tool (git difftool) | |
@@ -228,6 +234,9 @@ If you would instead like to start an interactive rebase from the selected commi
228234
| `` i `` | Show git-flow options | |
229235
| `` <space> `` | チェックアウト | Checkout selected item. |
230236
| `` n `` | 新しいブランチを作成 | |
237+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
238+
239+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
231240
| `` o `` | Pull Requestを作成 | |
232241
| `` O `` | View create pull request options | |
233242
| `` <c-y> `` | Pull RequestのURLをクリップボードにコピー | |
@@ -353,6 +362,9 @@ If you would instead like to start an interactive rebase from the selected commi
353362
| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
354363
| `` o `` | ブラウザでコミットを開く | |
355364
| `` n `` | コミットにブランチを作成 | |
365+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
366+
367+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
356368
| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. |
357369
| `` C `` | コミットをコピー (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
358370
| `` <c-r> `` | Reset copied (cherry-picked) commits selection | |

docs/keybindings/Keybindings_ko.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
6060
| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
6161
| `` o `` | 브라우저에서 커밋 열기 | |
6262
| `` n `` | 커밋에서 새 브랜치를 만듭니다. | |
63+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
64+
65+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
6366
| `` g `` | View reset options | View reset options (soft/mixed/hard) for resetting onto selected item. |
6467
| `` C `` | 커밋을 복사 (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
6568
| `` <c-r> `` | Reset cherry-picked (copied) commits selection | |
@@ -90,6 +93,9 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
9093
| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
9194
| `` o `` | 브라우저에서 커밋 열기 | |
9295
| `` n `` | 커밋에서 새 브랜치를 만듭니다. | |
96+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
97+
98+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
9399
| `` g `` | View reset options | View reset options (soft/mixed/hard) for resetting onto selected item. |
94100
| `` C `` | 커밋을 복사 (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
95101
| `` <c-r> `` | Reset cherry-picked (copied) commits selection | |
@@ -184,6 +190,9 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
184190
| `` i `` | Git-flow 옵션 보기 | |
185191
| `` <space> `` | 체크아웃 | Checkout selected item. |
186192
| `` n `` | 새 브랜치 생성 | |
193+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
194+
195+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
187196
| `` o `` | 풀 리퀘스트 생성 | |
188197
| `` O `` | 풀 리퀘스트 생성 옵션 | |
189198
| `` <c-y> `` | 풀 리퀘스트 URL을 클립보드에 복사 | |
@@ -287,6 +296,9 @@ If you would instead like to start an interactive rebase from the selected commi
287296
| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
288297
| `` o `` | 브라우저에서 커밋 열기 | |
289298
| `` n `` | 커밋에서 새 브랜치를 만듭니다. | |
299+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
300+
301+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
290302
| `` g `` | View reset options | View reset options (soft/mixed/hard) for resetting onto selected item. |
291303
| `` C `` | 커밋을 복사 (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
292304
| `` <c-t> `` | Open external diff tool (git difftool) | |

docs/keybindings/Keybindings_nl.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
9696
| `` i `` | Laat git-flow opties zien | |
9797
| `` <space> `` | Uitchecken | Checkout selected item. |
9898
| `` n `` | Nieuwe branch | |
99+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
100+
101+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
99102
| `` o `` | Maak een pull-request | |
100103
| `` O `` | Bekijk opties voor pull-aanvraag | |
101104
| `` <c-y> `` | Kopieer de URL van het pull-verzoek naar het klembord | |
@@ -169,6 +172,9 @@ If you would instead like to start an interactive rebase from the selected commi
169172
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
170173
| `` o `` | Open commit in browser | |
171174
| `` n `` | Creëer nieuwe branch van commit | |
175+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
176+
177+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
172178
| `` g `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. |
173179
| `` C `` | Kopieer commit (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
174180
| `` <c-t> `` | Open external diff tool (git difftool) | |
@@ -231,6 +237,9 @@ If you would instead like to start an interactive rebase from the selected commi
231237
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
232238
| `` o `` | Open commit in browser | |
233239
| `` n `` | Creëer nieuwe branch van commit | |
240+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
241+
242+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
234243
| `` g `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. |
235244
| `` C `` | Kopieer commit (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
236245
| `` <c-r> `` | Reset cherry-picked (gekopieerde) commits selectie | |
@@ -322,6 +331,9 @@ If you would instead like to start an interactive rebase from the selected commi
322331
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
323332
| `` o `` | Open commit in browser | |
324333
| `` n `` | Creëer nieuwe branch van commit | |
334+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
335+
336+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
325337
| `` g `` | Bekijk reset opties | View reset options (soft/mixed/hard) for resetting onto selected item. |
326338
| `` C `` | Kopieer commit (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. |
327339
| `` <c-r> `` | Reset cherry-picked (gekopieerde) commits selectie | |

docs/keybindings/Keybindings_pl.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita,
8282
| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). |
8383
| `` o `` | Otwórz commit w przeglądarce | |
8484
| `` n `` | Utwórz nową gałąź z commita | |
85+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
86+
87+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
8588
| `` g `` | Reset | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. |
8689
| `` C `` | Kopiuj (cherry-pick) | Oznacz commit jako skopiowany. Następnie, w widoku lokalnych commitów, możesz nacisnąć `V`, aby wkleić (cherry-pick) skopiowane commity do sprawdzonej gałęzi. W dowolnym momencie możesz nacisnąć `<esc>`, aby anulować zaznaczenie. |
8790
| `` <c-t> `` | Otwórz zewnętrzne narzędzie różnic (git difftool) | |
@@ -122,6 +125,9 @@ Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita,
122125
| `` i `` | Pokaż opcje git-flow | |
123126
| `` <space> `` | Przełącz | Przełącz wybrany element. |
124127
| `` n `` | Nowa gałąź | |
128+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
129+
130+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
125131
| `` o `` | Utwórz żądanie ściągnięcia | |
126132
| `` O `` | Zobacz opcje tworzenia pull requesta | |
127133
| `` <c-y> `` | Kopiuj adres URL żądania ściągnięcia do schowka | |
@@ -263,6 +269,9 @@ Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita,
263269
| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). |
264270
| `` o `` | Otwórz commit w przeglądarce | |
265271
| `` n `` | Utwórz nową gałąź z commita | |
272+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
273+
274+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
266275
| `` g `` | Reset | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. |
267276
| `` C `` | Kopiuj (cherry-pick) | Oznacz commit jako skopiowany. Następnie, w widoku lokalnych commitów, możesz nacisnąć `V`, aby wkleić (cherry-pick) skopiowane commity do sprawdzonej gałęzi. W dowolnym momencie możesz nacisnąć `<esc>`, aby anulować zaznaczenie. |
268277
| `` <c-r> `` | Resetuj wybrane (cherry-picked) commity | |
@@ -303,6 +312,9 @@ Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita,
303312
| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). |
304313
| `` o `` | Otwórz commit w przeglądarce | |
305314
| `` n `` | Utwórz nową gałąź z commita | |
315+
| `` N `` | Move commits to new branch | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.
316+
317+
Note that this disregards the selection, the new branch is always created from the tip of the current branch. |
306318
| `` g `` | Reset | Wyświetl opcje resetu (miękki/mieszany/twardy) do wybranego elementu. |
307319
| `` C `` | Kopiuj (cherry-pick) | Oznacz commit jako skopiowany. Następnie, w widoku lokalnych commitów, możesz nacisnąć `V`, aby wkleić (cherry-pick) skopiowane commity do sprawdzonej gałęzi. W dowolnym momencie możesz nacisnąć `<esc>`, aby anulować zaznaczenie. |
308320
| `` <c-r> `` | Resetuj wybrane (cherry-picked) commity | |

0 commit comments

Comments
 (0)