Linux/GIT

1

Добрый день! Я не могу поместить в репозиторий BitBucket наш проект Киномостер. Причем не из командной строки, не из Sourcetree. Не получается самостоятельно разобраться с проблемой. Все закомичевается, но дальше выдает следующею ошибку:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master
Pushing to https://[email protected]/ESBGL/kinomonster.git
To https://bitbucket.org/ESBGL/kinomonster.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://[email protected]/ESBGL/kinomonster.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

путь прописан верно, проверял неоднократно, ну и Sourcetree по этому пути файлы видит и комитит, но не отправляет в BitBucket. Выше указанный текст появляется после того как я нашимаю на отправить (push).

Буду благодарен за объяснения проблемы. Без ее решения двигаться дальше не могу.

Этот код у меня получается если я пытаюсь добавить проект через командную строку:

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$ ls -la
total 43
drwxr-xr-x 1 Ed 197121 0 май 24 21:29 ./
drwxr-xr-x 1 Ed 197121 0 май 21 22:38 ../
drwxr-xr-x 1 Ed 197121 0 май 24 21:38 .git/
-rw-r--r-- 1 Ed 197121 1299 май 15 00:33 extends.class.php
-rw-r--r-- 1 Ed 197121 952 май 13 23:39 file.php
-rw-r--r-- 1 Ed 197121 1281 май 14 22:09 index.php
-rw-r--r-- 1 Ed 197121 1281 май 12 23:59 indexcopy.php
-rw-r--r-- 1 Ed 197121 355 май 14 22:44 oop.php
-rw-r--r-- 1 Ed 197121 1723 май 15 23:21 oop2.php
-rw-r--r-- 1 Ed 197121 2652 май 13 00:00 parser.php
-rw-r--r-- 1 Ed 197121 1196 май 12 18:18 player.php
-rw-r--r-- 1 Ed 197121 123 май 24 20:34 test.txt
-rw-r--r-- 1 Ed 197121 25 май 13 23:30 test2.txt
drwxr-xr-x 1 Ed 197121 0 май 12 18:37 xml/

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$ git init
Reinitialized existing Git repository in C:/xampp/htdocs/kinomonster/.git/

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$ git remote add origin http://[email protected]/ESBGL/Kinomonster.git
fatal: remote origin already exists.

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$ git add --all

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$ git commit -m "first commit"
On branch master
nothing to commit, working tree clean

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$ git push -u origin master
To https://bitbucket.org/ESBGL/kinomonster.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://[email protected]/ESBGL/kinomonster.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Ed@HhwpEd MINGW64 /c/xampp/htdocs/kinomonster (master)
$

linux
git
bitbucket
push

1 ответов

2

Вопрос решил с помощью команды 

git push -f origin master (где -f это force), т.е. принудительно засунул все с локального хранилища на обсуждаемый выше облачный сервер...

но все-таки хотелось бы разобраться почему не шло в обычном варианте... через 

git push -u origin master

Есть идеи?

Sign up or Log in to write an answer