Skip to content

Instantly share code, notes, and snippets.

@jnareb
Created July 12, 2017 18:21
Show Gist options
  • Save jnareb/ee721a6bc975bdd2edd62c26a4111879 to your computer and use it in GitHub Desktop.
Save jnareb/ee721a6bc975bdd2edd62c26a4111879 to your computer and use it in GitHub Desktop.
`git --force-with-lease` zapobiega nadpisaniu czyichś zmian
$ git push
To https://git.company.com/repo.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://git.company.com/repo.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.
$ git push --force-with-lease
To https://git.company.com/repo.git
! [rejected] master -> master (stale info)
error: failed to push some refs to 'https://git.company.com/repo.git'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment