talisman icon indicating copy to clipboard operation
talisman copied to clipboard

error when push fails due to changes on remote

Open jacksingleton opened this issue 8 years ago • 4 comments

When another change has been made on the remote I'm pushing to (requiring a git pull) talisman fails in quite an ugly way:

FATA[0000] Command execution failed                      error=exit status 128 output=
error: failed to push some refs to '[email protected]:jacksingleton/push-test.git'

jacksingleton avatar Apr 20 '16 01:04 jacksingleton

@aaquibzama-tw @vhasus This is still reproducible. Any possible solutions for this?

harinee avatar Apr 28 '19 09:04 harinee

@svishwanath-tw are you looking into this issue? If not, could you please un-assign yourself?

harinee avatar Oct 01 '19 07:10 harinee

Can anyone add steps to reproduce this? I would like to try a hand at fixing this.

jpninanjohn avatar Oct 05 '19 07:10 jpninanjohn

@jpninanjohn

Steps to reproduce:

  1. Ensure you do not have Talisman installed.
  2. On an existing git repo, make some changes on the github remote repo directly (or get another collaborator to make some changes)
  3. On your local machine, without taking a pull, try to push. You will see the error as : ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:user1/somerepo.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  4. Now install Talisman as a pre-push hook
  5. Repeat step 2.
  6. On your local machine, without taking a pull, try to push. Now the error you will see is the uglier one: FATA[0000] Git command execution failed command=git diff da142d5ef07cc44c967e791279c05c16c1018..d731f1bfdaad1eadc8a5d069d11e8c9de0db9a --name-only --diff-filter=ACM dir=/some/somrepo error=exit status 128 output=fatal: Invalid revision range da142d5ef07cc44c967e791279c05c16c1018..d731f1bfdaad1eadc8a5d069d11e8c9de0db9a error: failed to push some refs to '[email protected]:user1/somerepo.git'

harinee avatar Oct 05 '19 21:10 harinee