Created a remote code repository on bitbucket. Then, following this instruction, I add a local repository to the bitbucket:
$ git init $ git add . $ git commit -m 'initial commit of full repository' $ git remote add origin git@bitbucket.org:username/perl.git $ git push -u origin --all Here is the message:
To bitbucket.org:username/perl.git
! [rejected] master -> master (fetch first)
error: unable to send some links to "git@bitbucket.org: username / perl.git"
hint: Updates were rejected because the external repository contains
hint: changes that you do not have in your local repository.
hint: Usually, this is due to the fact that someone has already sent changes to
hint: same place. Before resubmitting your changes, you need to
hint: pick up and merge changes from external repository to yourself
hint: (for example, using "git pull ...").
hint: For more information, see "Note about fast-forwards"
hint: in "git push --help".
Okay. The git pull origin master command writes the following:
warning: no common commits
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), ready.
From bitbucket.org:username/perl
* branch master -> FETCH_HEAD
* [new branch] master -> origin / master
fatal: failure to merge unrelated change histories
I used to use both Git and Bitbucket before, but for the first time I have such problems. In general, I do not understand what kind of nonsense.
git fetch; git log --oneline --decorate --graph --all;git fetch; git log --oneline --decorate --graph --all;, add the output of this command to the question ( edit ). - Nick Volynkin ♦