Link to existing github repository

I have created a repository on github and would now would like commit changes to this repository using git. I have a project file structure (created using heroku) to be commited. What steps are required in order to link an existing github repo with git ?

In the past I’ve used “github for windows” UI to create a github repository, this creates a file structure on my machine and as I update the file structure the changes are recognised.

  • How do I handle two separate yet very similar code-bases with git /github?
  • how to reduce size of git repository
  • Retrieve commit from a deleted branch in the remote
  • Git rebase / merge for public releases
  • Teamcity Git private Submodule checkout fails
  • Is SSH public key need to be the same each time I do push/pull with git repository?
  • But this new setup is a little different in that the project already exists and I want to link it to a new github repoistory.

  • Is it dangerous to include your googlecode password in .git/config?
  • Can I send git commit emails to multiple recipients?
  • Merging two repos with gitolite
  • What does the .git folder not contain?
  • Need help to find a strategy for repo (tool)
  • PHP: shell_exec multiple commands
  • One Solution collect form web for “Link to existing github repository”

    You need to add a new remote, pointing to github, and then push to it. The steps:

    1. Create repo on GitHub. Without a README, completely empty.

    2. In your existing repo: git remote add REMOTENAME URL. You could name the remote github, for example, or anything else you want. Copy the URL from the GitHub page of the repo you just created.

    3. Push from your existing repo: git push REMOTENAME BRANCHNAME. For example if you named your remote github and you want to push master to it, you would do git push github master

    Let me know if you need anything else.

    Git Baby is a git and github fan, let's start git clone.