Skip to content

Instantly share code, notes, and snippets.

@stevenjowens
Created February 16, 2017 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenjowens/799258f5f03f0f9a223ecfb75b5229bd to your computer and use it in GitHub Desktop.
Save stevenjowens/799258f5f03f0f9a223ecfb75b5229bd to your computer and use it in GitHub Desktop.
Problem overwriting repo
redbitter:my_project puff$ git remote set-url origin https://github.com/repo_owner_account/my_project.git
redbitter:my_project puff$ git push -u origin master
To https://github.com/repo_owner_account/my_project.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/repo_owner_account/my_project.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.
redbitter:my_project puff$ git pull
warning: no common commits
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/repo_owner_account/my_project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment