New to github plugin and github in general here, how do you download and upload to an online github repo you created? Specifically, how do you connect the downloaded project to a pre-existing repo?
git clone from the upstream, a git remote will be created that points at the source, and it will by default be called “origin.”
If you already have a project, you can add a new remote, using something like this (for a new remote you create, here called “upstream”)
git remote add upstream email@example.com:myname/myproject
“remotes” are really just shortcuts for git repository URLs, and their names only make sense locally – a remote that I call “upstream,” you might call “thegithub” and they’d have the same value, and do the same thing for us.
You can now attempt to pull changes from there:
git pull -r upstream
Note that if the upstream is different from your current project, then you may end up with merge conflicts, You need to resolve them (check with “git status”,) “git add” the files you resolved, and then “git rebase --continue” to keep going, until git says you have nothing more to resolve.
You can also push changes to there (if you create a totally empty project on github, this is how you push your code up to that empty repository the first time):
git push -u upstream master
This is how to use git from the command line. If you’re using some GUI tool, you may want to check the documentation for that tool to see how to do the equivalent things.
If you don’t like writing git commands. Visual studio already does this for you handles all .git and github setup and you don’t need a plugin for source control.