I created a script on a database server which I want to add to my remote repository.
I did the following in the directory which the SQL schema script exists
git init
git remote add origin https://my@bitbucket.org/me/myproject.git
git add schema.sql
git commit -m "added schema.sql"
when I do git push
I get the following
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
When I do git push --set-upstream origin master
I get
! [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.
I want to add this single file to my remote repository. Is there a simple way of doing this with git?