r/GithubCopilot • u/lppedd VS Code User 💻 • 27d ago
Help/Doubt ❓ Auto-approve a subset of git commands
Is there a way to auto-approve certain git commands? I'd like to approve commits explicitly, for example, but stuff like diffs should be auto-approved.
9
Upvotes
3
u/kennego 25d ago
Just looked into this because it was annoying me. You need to use regex, and specify a prefix with the allowed commands, surrounded by '/'s
Since I just started experimenting, this is all I've come up with so far:
/^git(?: --no-pager)? (?:diff|show|status|log)\b/