I have created a iPhone project with option "Create local git repository for this project" enabled. Recently I created a github account. Now I want to directly commit my code to github, not to my local repository. How could I do this?
Pushing code using XCode always gives problem to me .So best option is to push code using terminal. below are the steps to push code to git hub.
open terminal set path to the project folder.
check for modified or new file using command git commit --dry-run . It will show you all the modified or newly added file .also some Xcode file.
add new files and modified files using git command git add "file1 path" "file2 path" .also don't forget to add .proj file if u have added new file or changed Xcode setting.
commit your file using command git commit. it will open message window. so you can enter message by pressing i. once you have written message press :wq
run command git push origin HEAD.