git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Adding --force-if-newer flag to git push
@ 2022-10-22 16:58 Sergey
  2022-10-22 17:48 ` Junio C Hamano
  2022-10-25  7:56 ` Erik Cervin Edin
  0 siblings, 2 replies; 3+ messages in thread
From: Sergey @ 2022-10-22 16:58 UTC (permalink / raw)
  To: git@vger.kernel.org

Hello,

Would it be a good idea to add a new flag  --force-if-newer to the "git push" command, so that force-pushing would succeed only if the last local commit's date is newer than that on the remote branch?

Sometimes I find that a feature like this would be useful when I work on multiple different computers and I want to just push all local branches to the repo at once to sync it with whatever is the latest version. I know that using --force is kind of frowned upon in the Git community, so this is probably not the best idea because it would promote usage of this feature among the users. I just wanted to know your opinions and see if someone else would find it useul or it's just a dumb idea.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-25  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-22 16:58 Adding --force-if-newer flag to git push Sergey
2022-10-22 17:48 ` Junio C Hamano
2022-10-25  7:56 ` Erik Cervin Edin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).