Fellow Git users,
While trying to combine an existing repository, with a remote repository (ie. I started with having a local repository, and executed the “git add” command) it does not seem to work. I am stuck and don’t know how to fix it.
The commands I executed and their responses can be seen below.
Anybody that has any ideas?
Please feel free to link to the repository if you wish.
C:\Users\GIT\courcera>git remote add origin https://github.com/M7-Robotics/courcera.git C:\Users\GIT\courcera>git remote -v origin https://github.com/M7-Robotics/courcera.git (fetch) origin https://github.com/M7-Robotics/courcera.git (push) C:\Users\GIT\courcera>git status On branch master nothing to commit, working tree clean C:\Users\GIT\courcera>git push -u origin master To https://github.com/M7-Robotics/courcera.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/M7-Robotics/courcera.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. C:\Users\GIT\courcera>git pull origin master From https://github.com/M7-Robotics/courcera * branch master -> FETCH_HEAD fatal: refusing to merge unrelated histories