1

I'm new to GitHub and I've searched a lot and tried this, this, this and this method but I'm still getting different errors.
I've a project which has WatchKit extensions init. Now when I first created the project I didn't checked marked on Create a Git Repository. Now I want to upload the project to my git account. I have checked the following things:
1: Xcode > Preferences > Source Control > And it is enabled.
2: Source Control > Working Copies > Configure > Remotes > + > Then added the name and link created from my repo which I created online from my account. And it adds this automatically to all the three folders i.e. Project folder and Apple Watch Extension folders. But when I pust it from Source Control > Push it gave me this error Multiple errors occurred during the operation.
3: I've tried doing it from terminal but after asking for my username and password I got remote: Repository not found. fatal: repository 'https://github.com/ibjects/My-App.git/' not found

So I have no idea where I'm doing wrong. And If I'm missing any information I'm ready to provide it as I don't know what else to mention.

Community
  • 1
  • 1
Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116

1 Answers1

4

Try to do it like this:

  1. Go to the project folder in the terminal and run the command:

        git init
    
  2. Now add the remote URL :

       git remote add origin your-url
    
  3. Add everything to the git:

       git add -A
    
  4. commit the message:

       git commit -m 'commit message'
    
  5. push to the branch

       git push origin master
    
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
  • Here is the output I got after each line. 1: Reinitialized existing Git repository in... 2: No message 3: On branch master Your branch is up-to-date with 'MyProject/master'. nothing to commit, working directory clean. 4: Everything up-to-date – Chaudhry Talha Jan 26 '16 at 21:03
  • that means your code is already in the github, check it in the github site. Your code should be there in the master branch – Teja Nandamuri Jan 26 '16 at 21:04
  • Yeah I just refreshed the page and it's there. But which method works I don't know that :D – Chaudhry Talha Jan 26 '16 at 21:05
  • This is the normal/basic way. You can use source tree app to skip all these commands. – Teja Nandamuri Jan 26 '16 at 21:06