I've a problem with GIT for push into an empty repository with this error when I do git push --set-upstream origin master
.
On Windows I type in project's folder:
git init
git remote add origin https://almatoolbox.visualstudio.com/xxxxxxx/_git/TS_smartroad-tests
git add .
git commit
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
then I type:
git push --set-upstream origin master
but I have this error:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://almatoolbox.visualstudio.com/ANAS/_git/TS_smartroad-tests'
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 deploy my project folder into branch master and develop. Is it possible? If i do git pull origin master i have this error:
git pull origin master
From https://almatoolbox.visualstudio.com/ANAS/_git/TS_smartroad-tests
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
git remote -vv
origin https://almatoolbox.visualstudio.com/xxxxxxx/_git/TS_smartroad-tests (fetch)
origin https://almatoolbox.visualstudio.com/xxxxxxx/_git/TS_smartroad-tests (push)
and my branches are:
git branch -vv
develop 87d2624 [origin/develop] Deleted pom.xml
* master 824e4a7 ok