M.O.R.R.I.S. M.O.R.R.I.S. - 1 year ago 142
Git Question

Upload .git - GitHub

i have continued to working with Github visual studio extension and accidentally I deleted

repository from GitHub.
Now i study for working with Git bash and i not have a .git repository. There is a way for upload
repository from GitHub?

Answer Source

If you accidentally deleted a .git folder in your local working copy, and want to restore it from remote repository (e.g. on GitHub), then the following should work (assuming that you are in the root directory where you want to put .git folder):

git init
git remote add origin <url>
git fetch
git reset origin/master

Here <url> is the URL of the remote repository (for instance, git@github.com:git/git.git or https://github.com/git/git.git).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download