mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
feat: support for push --force-if-includes
This commit is contained in:
parent
cd9111837e
commit
e00f248cf7
3 changed files with 42 additions and 2 deletions
|
@ -29,7 +29,11 @@ func (self *SyncCommands) PushCmdObj(opts PushOpts) (oscommands.ICmdObj, error)
|
|||
cmdStr := "git push"
|
||||
|
||||
if opts.Force {
|
||||
cmdStr += " --force-with-lease"
|
||||
if self.version.IsOlderThan(2, 30, 0) {
|
||||
cmdStr += " --force-with-lease"
|
||||
} else {
|
||||
cmdStr += " --force-with-lease --force-if-includes"
|
||||
}
|
||||
}
|
||||
|
||||
if opts.SetUpstream {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue