Reputation: 11
This is my problem and i tried to look solution, didn't find anything related to me.
created new project 1 —> and pushed to github.com (this project is dummy has no code) created new project 2 —> wrote code and tried pushing to github.com with remote link to project 1 it gave me an error stating to 1st use pull the request. I did pull request.
now the project 2 became empty (which took 2 days to code) is there any option to get back my code?
Upvotes: 1
Views: 1466
Reputation: 1132
That is a very strange situation. You shouldn't have been able to do what you describe.
Simulating what you describe in Xcode 8.0, I get a The remote repository could no be found - make sure a valid repository exists at the specified location and try again.
message, because the projects are different.
Maybe something else happened.
Nevertheless, may this be a lesson to you. Commit locally first and then to the remote. You can do both, one after the other, with one operation in Xcode, by checking the Push to Remote
box in the commit screen. That way you would still have your local code. ;-)
Upvotes: 1