Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21630

Allow force push when amend and push already pushed git commit

XMLWordPrintable

    • All
    • 1333b695d4453729a94bea8eff3a88f2f76c84a1 (qt-creator/qt-creator/master)

      When amending a commit with QtCreator it is possible to select "Commit and Push" action from the button menu. However if the amended change had been pushed previously the push will be rejected with a similar message:

       

      To github.com:martonmiklos/dbcc.git

      ! [rejected] add_support_for_value_lists -> add_support_for_value_lists (non-fast-forward)

      error: failed to push some refs to 'git@github.com:martonmiklos/dbcc.git'

      hint: Updates were rejected because the tip of your current branch is behind

      hint: its remote counterpart. Integrate the remote changes (e.g.

      hint: 'git pull ...') before pushing again.

      hint: See the 'Note about fast-forwards' in 'git push --help' for details.

      The command "/usr/bin/git" terminated with exit code 1.

       

      In this case it is necessary to push with git push --force from command line.

      I would suggest to add a "Force push" checkbox left to the Commit button which would only appear in this scenario (amended commit is pushed and the Commit and Push option is selected).

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            orgads Orgad Shaneh
            martonmiklos Miklós Márton
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes