Pushing from local repository to GitHub hosted remote

前端 未结 5 494
我在风中等你
我在风中等你 2020-11-28 17:57

I created a local repository of my Visual Studio 2010 solution folder using Git GUI on my dev machine. I then created a remote repository in my GitHub account. Now, I am loo

5条回答
  •  孤街浪徒
    2020-11-28 18:03

    You push your local repository to the remote repository using the git push command after first establishing a relationship between the two with the git remote add [alias] [url] command. If you visit your Github repository, it will show you the URL to use for pushing. You'll first enter something like:

    git remote add origin git@github.com:username/reponame.git
    

    Unless you started by running git clone against the remote repository, in which case this step has been done for you already.

    And after that, you'll type:

    git push origin master
    

    After your first push, you can simply type:

    git push
    

    when you want to update the remote repository in the future.

提交回复
热议问题