@bond_1013
Начинающий веб-разработчик

Почему не могу загрузить файлы на гит?

Пытаюсь загрузить сайт на джанго на гитхаб . Получаю ошибку, как её исправить?
Перехожу в папку с проектом '
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.
  • Вопрос задан
  • 494 просмотра
Решения вопроса 2
sergey-gornostaev
@sergey-gornostaev
Седой и строгий
Не можете перевести текст "Updates were rejected because the remote contains work that you do not have locally. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again."? В нём и причина написана и решение.
Ответ написан
Комментировать
dimovich85
@dimovich85
https://u-academy.net/
Написано, что там куда пушите уже что-то есть. Может репу сделали не пустую, а с каким-то ридми и вот ошибка. Там написано, в консоли, что делать.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы