After using git to locally track a project, how can I add it to GitHub?

后端 未结 3 1400
难免孤独
难免孤独 2021-01-30 20:58

After using git to locally track a project, how can I add it to GitHub?

3条回答
  •  情深已故
    2021-01-30 21:47

    GitHub gives you instructions after you've created the repository online.

    cd to the directory with the local repository

    git remote add origin whatever-address-my-repository is.git to set the remote

    then make a commit, and push to the master branch.

    git push -u origin master

    https://help.github.com/articles/create-a-repo

提交回复
热议问题