A common issue during a branch rebase:
- merging multiple commits is pretty easy with the
squash
action - splitting a commit in smaller ones can be a pain in the *ss, especially if the changes are inside a common file.
An example of "to split" commit:
#!/bin/bash | |
command=$1 | |
PASSK_BACKEND=${PASSK_BACKEND:-gopass} | |
pass_show() { | |
case $PASSK_BACKEND in | |
pass) | |
pass show "$1" |
" Display `git show <commit>` during interactive rebase in the preview window | |
function! PreviewCommitDuringRebase() | |
try | |
if getline(".") =~ '^\s*#' | |
throw "This is a comment line, do not preview" | |
endif | |
" get 2nd column == commit hash. Will fail if 2nd does not exists | |
let hash = split(getline('.'))[1] | |
let commitshow = systemlist("git show " . hash) |
A common issue during a branch rebase:
squash
actionAn example of "to split" commit:
Install msys2 + gdb:
Install msys2 (64bits version)
In msys2 command line, install gdb:
msys:~$ pacman -S mingw-w64-x86_64-gdb