I have a computer with my git project (computer A). I then did a git clone of it to work on it on another computer (computer B). I have made some changes on the new computer (B) and did a commit and a push. All seems well.
$ git push
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 539 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To mike@xx.xx.xxx.xx:/photos/
2bf1437..ef7de42 mike -> mike
When I go to my original computer (A) and do a git fetch it doesn’t fetch anything. Is there something I need to do to tell computer B about computer A?
I did a git pull on computer B and it says the following:
Your configuration specifies to merge with the ref ‘mike’ from the
remote, but no such ref was fetched.
Based on your comments on your question, you need to change Computer A’s
originremote to match B’s. On computer B issue the following command:That will output something. Suppose it is
<url>. Now, on Computer A, issue these commands:That removed the bad origin reference and updated it to match B’s. Now issue
git push origin mikefrom Computer A, and try the fetch again on Computer B. Should work just fine.