SourceTree For Mac
  1. SourceTree For Mac
  2. SRCTREE-1156

Force push option, only displayed via opt-in in Preferences

    Details

    • Type: Improvement Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
      None
    • Last commented by user?:
      true

      Description

      See comments by Timothy Robb here:
      https://answers.atlassian.com/questions/54469/how-do-i-perform-a-forced-push-push-f-from-sourcetree?page=1#comment-75151

      Upshot is that for the minority of people that do use a workflow which requires force pushing, not supporting it is an issue. However, we don't want to offer it lightly, because it could be abused by people who don't understand the impact fully.

      Proposed approach:

      1. Option in Preferences to 'Allow force push'. Only when this option is enabled should the force push checkbox appear on the Push dialog
      2. Using the force push option on the push dialog should still show a warning (with a 'Don't tell me again' checkbox)
      3. The 'force' option should never be remembered in the push dialog

        Issue Links

          Activity

          Hide
          Marius added a comment -

          "Upshot is that for the minority of people that do use a workflow which requires force pushing, not supporting it is an issue."

          I used the hgflow-extension of SourceTree and can not push the initialization to the server - everyone using hgflow or otherwise creating new remote heads doesn't seem to be a minority to me. I'd call it an issue for sure.

          Show
          Marius added a comment - "Upshot is that for the minority of people that do use a workflow which requires force pushing, not supporting it is an issue." I used the hgflow-extension of SourceTree and can not push the initialization to the server - everyone using hgflow or otherwise creating new remote heads doesn't seem to be a minority to me. I'd call it an issue for sure.
          Hide
          Steve Streeting [Atlassian] added a comment - - edited

          @Marius: force push won't solve that, it'll just bypass it and create more HEADs that you don't need. The correct way to resolve it is to pull & merge (or pull & rebase).

          The case for force push in the linked discussion was very, very specific, and involves personal branches which is why forcing isn't a problem. Initialising hg-flow creates a new commit on every branch, which means it is bound to screw other people up if you force push that change.

          Show
          Steve Streeting [Atlassian] added a comment - - edited @Marius: force push won't solve that, it'll just bypass it and create more HEADs that you don't need. The correct way to resolve it is to pull & merge (or pull & rebase). The case for force push in the linked discussion was very, very specific, and involves personal branches which is why forcing isn't a problem. Initialising hg-flow creates a new commit on every branch, which means it is bound to screw other people up if you force push that change.
          Hide
          Nico Wald added a comment -

          Our workflow contains rebase of user branches – so force push is performed multiple times a day. Branch level permissions provided by gitolite make sure nobody pushes away the work of others. Only admins have force push rights on the main branch(es). I'd really like to see a force push option in SourceTree.
          Thank you.
          Regards, Nico

          Show
          Nico Wald added a comment - Our workflow contains rebase of user branches – so force push is performed multiple times a day. Branch level permissions provided by gitolite make sure nobody pushes away the work of others. Only admins have force push rights on the main branch(es). I'd really like to see a force push option in SourceTree. Thank you. Regards, Nico
          Hide
          Kieran Senior [Atlassian] added a comment -

          Note that this isn't for 1.6 so hasn't been merged into default yet

          Show
          Kieran Senior [Atlassian] added a comment - Note that this isn't for 1.6 so hasn't been merged into default yet
          Hide
          Sam Stenvall added a comment -

          Will this option be available for Git repositories too? The force option is used to update single-commit pull requests on Github so it would be very useful.

          Show
          Sam Stenvall added a comment - Will this option be available for Git repositories too? The force option is used to update single-commit pull requests on Github so it would be very useful.
          Hide
          Richard Lalancette added a comment -

          This missing feature has been bugging me for a while now.
          I use rebase + force push frequently. I need to go do my pushes on the terminal instead, which is getting irritating.

          Show
          Richard Lalancette added a comment - This missing feature has been bugging me for a while now. I use rebase + force push frequently. I need to go do my pushes on the terminal instead, which is getting irritating.
          Hide
          Kieran Senior [Atlassian] added a comment -

          Richard Lalancette Sorry, I'm not sure if I'm understanding you. Force push is currently available in SourceTree for Mac from the push sheet as of version 1.7.0 provided you enable the option in your SourceTree preferences.

          Cheers

          Show
          Kieran Senior [Atlassian] added a comment - Richard Lalancette Sorry, I'm not sure if I'm understanding you. Force push is currently available in SourceTree for Mac from the push sheet as of version 1.7.0 provided you enable the option in your SourceTree preferences. Cheers

            People

            • Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last commented:
                8 weeks, 6 days ago