Github "Updates were rejected because the remote contains work that you do not have" -


i created new repo, cloned it, added files directory, added them add -a, committed changes, , when try push using git push <repo name> master "updates rejected because remote contains work not have".

this doesn't seem make sense since it's new repo , contains readme file.

this happens if initialized new github repo readme and/or license file

git remote add origin [//your github url]  //pull changes  git pull origin master  //now, push work new repo  git push origin master 

now able push repository github. basically, have merge new initialized files work. git pull fetches , merges you. can fetch , merge if suits you.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -