Question: is there a possibility of getting a warning before a git push -f
- From
Aditya Garg <gargaditya08@live.com>
- Date
- Jun 9, 2025, 16:46 UTC
- Message-ID
- <PN0PR01MB95880EAA98466C9AB049BA44B86BA@PN0PR01MB9588.INDPRD01.PROD.OUTLOOK.COM>
One thing I sometimes encounter is that I sometimes git push -f and moments later I realise I did it at the wrong time, result being a disaster. I was wondering if a little [y/N] warning could be possible before the risky command gets executed. I saw the code for push superficially and I don't think it's implemented. I think it would be a nice feature though.