A
A
antonstolar2019-10-13 12:54:58
git
antonstolar, 2019-10-13 12:54:58

Why can't I upload my site to github? Why could such an error occur? How to fix?

I upload the site to github.
I created an account on github, then created a repository I did it
in this order:
1. opened the project folder on the command line
2. git init
3. git add --all
4. git commit -m "first commit"
5. git remote add origin https: //github.com/myaccount/mynewrepo.git
6. git push -u origin master
and I got an error:
error: failed to push some refs to
' https://github.com/myaccount/mynewrepo.git ' try to write:
git pull --rebase origin master
But nothing helped....The same error again...Why could such an error occur? How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Demigodd, 2019-10-13
@Demigodd

You can do a git clone of the repository, add the project files to the cloned repository folder, then follow the old scheme.
git add .
git commit -m "first commit"
git push

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question