I am getting the following error on pushing the local git repo to empty remote repo. It's a private repo.
$ git push origin master To https://bitbucket.org/lord_of_codes/uat_api.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://lord_of_codes@bitbucket.org/lord_of_codes/uat_api.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 just created a empty git repo on bit bucket.
I did git init
in my local project
I did git add .
I commit for first git commit -m "Initial Commit"
I did git config --global user.name
git config --global user.email
I did git remote add origin url
I did git push origin master
Then I got that error.
I also tried pushing codes before commit, and also tried git pull
. But It's not working