Skip to content

Bash script to perform simple git rebase -i operations right in command line (ie. used as tig bindings)

License

Notifications You must be signed in to change notification settings

Nattfarinn/tig-rebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

tig-rebase

Bash script to perform simple git rebase -i operations right in command line (ie. used as tig bindings)

Usage

tig-rebase.sh fixup|ascend|descend|reword|abort HASH

Example .tigrc

# Fixup with parent commit
bind main <Ctrl-f> !tig-rebase.sh fixup %(commit)
bind diff <Ctrl-f> !tig-rebase.sh fixup %(commit)

# Rebase to move commit up
bind main <Ctrl-k> !tig-rebase.sh ascend %(commit)
bind diff <Ctrl-k> !tig-rebase.sh ascend %(commit)

# Rebase to move commit down
bind main <Ctrl-j> !tig-rebase.sh descend %(commit)
bind diff <Ctrl-j> !tig-rebase.sh descend %(commit)

# Edit commit message
bind main <Ctrl-r> !tig-rebase.sh reword %(commit)
bind diff <Ctrl-r> !tig-rebase.sh reword %(commit)

# Abort current rebase
bind main <Ctrl-x> !tig-rebase.sh abort
bind diff <Ctrl-x> !tig-rebase.sh abort

# Create fixup commit from current staged changes (no rebase happens
# here, this just creates a commit to fix the selected commit)
bind main <Ctrl-F> !git commit --fixup %(commit)
bind diff <Ctrl-F> !git commit --fixup %(commit)

About

Bash script to perform simple git rebase -i operations right in command line (ie. used as tig bindings)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages