Я создал скрипт на сервере базы данных, который я хочу добавить в свой удаленный репозиторий.
Я сделал следующее в каталоге, в котором существует сценарий схемы SQL
git init
git remote add origin https://my@bitbucket.org/me/myproject.git
git add schema.sql
git commit -m "added schema.sql"
, когдаЯ получаю git push
Я получаю следующее
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
Когда я делаю git push --set-upstream origin master
Я получаю
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://my@bitbucket.org/me/myproject.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Я хочу добавить этот единственный файл в мой удаленный репозиторий. Есть ли простой способ сделать это с помощью git?