Skip to content

Protect git master branch, when you want edit a file in master branch, this will give you an error message, and open this file with Read Only Mode

Notifications You must be signed in to change notification settings

fortyMiles/git_protected_vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Safer VIM for git

Why you need this?

This will make you can not modify any file in git master branch.

How To Use That?

  1. Clone the file to your any path, in this readme, I will put this file in my home/bin.

  2. and change the new_vim mode

$chmod 755 new_viw
  1. set $PATH in your .bash_profile or .zshrc(if you use zsh)
$export PATH=$PATH:/Users/develop/bin
  1. set alise
$alias vi='new_vi'

About

Protect git master branch, when you want edit a file in master branch, this will give you an error message, and open this file with Read Only Mode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages