I create a Git repo and pushed few commits to GitHub. Then I download this project manually (instead of using
If the version that you manually downloaded includes a
.git folder, then the solution is simple:
# add / commit if necessary first git remote add origin <github url> git push origin master
However, my understanding is that GitHub's zip files don't include the
.git folder, which I assume is what you meant by "manually downloaded".
If you don't have the
Switch to the "real" local Git repo. (If your original repo was on another machine, then clone a new one from GitHub.)
Copy all the files from your manually-downloaded version to your local repo.
Add and commit:
git add . git commit -m "Foo the bar because baz"
(You can also split the changes into multiple commits by
git adding specific files, and/or using
git add --patch.)
git push origin master
In the future, it's generally better to clone the repo rather than downloading a zip file of its contents. Since Git commits are local by default, you can even make many commits locally without affecting anything on the server.