Answers for "Updates were rejected because the remote contains work that you do"

5

Updates were rejected because the remote contains work that you do

git pull origin master
git push -u origin master
Posted by: Guest on October-03-2020
1

updates were rejected because the remote contains work that you do

git remote add origin [//your github url]

//pull those changes

git pull origin master 

// or optionally, 'git pull origin master --allow-unrelated-histories' if you have initialized repo in github and also committed locally

//now, push your work to your new repo

git push origin master



Credit to palerdot's answer on this post:
https://stackoverflow.com/questions/18328800/github-updates-were-rejected-because-the-remote-contains-work-that-you-do-not-h
Posted by: Guest on February-07-2021

Code answers related to "Updates were rejected because the remote contains work that you do"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language