jesseduffield / jesseduffield/lazygit

Feature for protection against pushing to remote main/master

Open
#3,716 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

If you forget to switch branch from master/main and press the key **P** or perhaps you meant to press **p** (for pulling) you could in theory do something that could have a big consequence if you work against a repo that are used for CD/gitops/configuration management. Sure! Those repos should definitely have branch protection in place anyway to disable force pushing, only merge commits thru PR/branches etc, but lets think worst case scenario and say someone forgets to enable them or they are temporarily disabled.

What about optional protection feature that will give you a big warning you if you try to push against remote master/main branches?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.