How to connect Xcode 9 and GitHub?

前端 未结 2 579
心在旅途
心在旅途 2020-12-19 14:07

I am part of a group of computer science students building their first project in Swift. We have attempted to connect GitHub with the XCode git configurations so we can all

2条回答
  •  星月不相逢
    2020-12-19 14:56

    Create a repository in GitHub (preferably private if you have a paid account) after you create the project head to terminal and navigate to project by:

    cd  path_to_project
    

    then run these commands

    git init
    
    git commit -m "first commit"
    
    git remote add origin https://github.com/UserName/RepoName.git
    
    git push -u origin master
    

    After that you can commit and push from source control menu in Xcode, then every student make a checkout so he can add his tasks and push.

提交回复
热议问题