FG
💻 Software

Disable specific git commands in a particular repository?

Fresh5 days ago
Mar 15, 20262841 views
Confidence Score0%
0%

Problem

Three times recently, I've done really stupid things while using . Twice I've run on my home-directory repository. The first time I fat-fingered a reverse-history search in my shell (didn't mean to run it at all), and the second time I was in the wrong terminal window (meant to reset a different re…

Error Output

[alias]
reset = "!echo no"
push = "!echo wrong repo"

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Disable specific git commands in a particular repository?

Low Risk

Not exactly a wrapper script – you can create a shell function: There isn't a simpler way than that. Edit: Added to grep: without it, grep interfered with calls like , which became , and also with tab completion features.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment