Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git: failed-to-push-some-refs #76

Open
ianmiell opened this issue Jul 1, 2020 · 0 comments
Open

Git: failed-to-push-some-refs #76

ianmiell opened this issue Jul 1, 2020 · 0 comments

Comments

@ianmiell
Copy link
Collaborator

ianmiell commented Jul 1, 2020

NOTES:

====== 'Failed to push some refs to' errors ======

===== Overview =====

===== Check RunBook Match =====

If your error looks similar to this, then this is a match:

''$ git push\
To ssh://meirionconsulting.com:/var/cache/git/work.git\
! [rejected] master -> master (fetch first)\
error: failed to push some refs to 'ssh://[email protected]:/var/cache/git/work.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.''

===== Initial Steps Overview =====

  • [[failed-to-push-some-refs#gather_facts|Gather facts]]
  • [[failed-to-push-some-refs#examine_differences|Examine differences]]
  • [[failed-to-push-some-refs#decide_on_resolution|Decide on resolution]]

===== Detailed Steps =====

==== 1) Gather facts ====

Examine the output of your error above and extract the key points of information:

Note down the repository mentioned in the ''To '' line in the output as the 'remote repository'.

Note down the two names either side of the ''->'' in the line that begins ''! [rejected]'' as 'fromref' and 'toref' respectively.

Run:

''git remote -v | grep fetch''

from within your repository. Find the line that matches your 'remote repository' and note the first word on the line as the 'remote repository reference'.

==== 2) Examine differences ====

Make sure you have your remote branch 'fetched' locally ready for comparison.

TODO

==== 3) Decide on resolution ====

TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant