Answer the question
In order to leave comments, you need to log in
Why can't I upload files to git?
I'm trying to upload a django site to github. I get an error, how do I fix it?
Go to the project folder '
cd mysite
git init
git add --all
warning: LF will be replaced by CRLF in shop/static/css/style.min.css.
The file will have its original line endings in your working directory
git config core.autocrlf true
git commit -m "first commit"
[master (root-commit) 4d92b70] first commit
164 files changed, 4360 insertions(+)
create mode 100644 cart/__init__.py
create mode 100644 cart/__pycache__/__init__.cpython-38.pyc
create mode 100644 cart/__pycache__/admin.cpython-38.pyc
create mode 100644 cart/__pycache__/cart.cpython-38.pyc
create mode 100644 cart/__pycache__/context_processors.cpython-38.pyc
create mode 100644 cart/__pycache__/forms.cpython-38.pyc
create mode 100644 cart/__pycache__/models.cpython-38.pyc
create mode 100644 cart/__pycache__/tests.cpython-38.pyc
create mode 100644 cart/__pycache__/urls.cpython-38.pyc
create mode 100644 cart/__pycache__/views.cpython-38.pyc
create mode 100644 cart/admin.py
...
...
...
git remote add origin https://github.com/name/project.git
git push origin master
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/name/project.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Answer the question
In order to leave comments, you need to log in
Can't translate "Updates were rejected because the remote contains work that you do not have locally. You may want to first integrate the remote changes hint: (eg, 'git pull ...') before pushing again."? It contains both the reason and the solution.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question