Skip to content

andreashimin/git-multi-revert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git-Multi-Revert

use vim to revert multiple commits

Installation

1. Install Git-Multi-Revert

sh -c "$(curl -fsSL https://raw.githubusercontent.com/andreashimin/git-multi-revert/master/tools/install.sh)"

2. Add Git-Multi-Revert Alias

  • On-My-Zsh
echo "alias git-multi-revert=\"sh ~/.git-multi-revert/scripts/multi-revert.sh\"" >> ~/.zshrc
  • Bash
echo "alias git-multi-revert=\"sh ~/.git-multi-revert/scripts/multi-revert.sh\"" >> ~/.bashrc

🚗🚗🚗 Then, you‘re good to go! 🤗

How to Use

  • Will return the latest commit logs untill your select commit
git-multi-revert ${commit SHA-1}

or

sh ~/.git-multi-revert/scripts/multi-revert.sh ${commit SHA-1}

Optional Revert Way

  • Give a range of commits(from latest...oldest) to Git-Multi-Revert
git-multi-revert ${commit SHA-1}...${commit SHA-1}
  • You can set a flag --auto, -a for Git-Multi-Revert automatic revert your commits
git-multi-revert ${commit SHA-1} --auto

Others

Edit Revert Commit Message

vi ~/.git-multi-revertrc

default

ENABLE_WORD="feature-toggle(enable)"
DISABLE_WORD="feature-toggle(disable)"

Uninstall Git-Multi-Revert

sh -c "$(curl -fsSL https://raw.githubusercontent.com/andreashimin/git-multi-revert/master/tools/uninstall.sh)"

About

use vim to revert multiple commits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages