I have a local project in C:\ABC folder, just realize it's time to back it up to GitHub. This is what I did:
Error Git: fatal: destination path "C:\ABC" already exists and is not an empty directory.
I understand it tried to fetch from GitHub to local, but what I want is the opposite. Googled found many articles and video on how to do from scratch, but not for existing local project.
Update of 2021-08,
see my latest step-by-step solution
Try instead with command-line:
cd c:\ABC
git init .
git config --global user.name <yourGitHubAccount>
git config --global user.email <yourGitHubEmailAccount>
git add .
git status
# edit .gitignore to ignore folder you don't want
git commit -m "first commit"
git remote add origin https://github.com/<yourGitHubAccount>/<yourRepo.git>
git push -u origin master
Make sure your GitHub repo was actually empty (no README.md
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With