Podczas korzystania z GIT wywala mi błedy podczas komendy GIT PUSH

0

Hej,
Założyłem konto na bitbucket, ale podczas korzystania z GIT wywala mi błedy podczas komendy GIT PUSH

Root@DESKTOP-EX MINGW64 ~/X (m                  aster)
$     git push --set-upstream origin master
To https://bitbucket.org/XXX/numbers-of-array.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://[email protected]/XXX/numbers-of-array.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.

Root@DESKTOP-EX MINGW64 ~/X (master)
$ 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

Mógłby ktoś pomóc, bo siedzę z tym już dobrą godzinę. Na GITHUBIE nie miałem takich problemów.
Dzięki!

2

Zedytowałeś jakiś commit lub pojawiły się nowe commity od czasu kiedy zrobiłeś pulla i teraz twoje zmiany nadpisały by to co jest w repo. Odpal git pull origin master wpierw by pobrać zmiany z remote.

0

Dzięki. Pomogło, jednak teraz wyrzuciło kolejny błąd.

$ git push -u origin master
Username for 'https://bitbucket.org': x
To https://bitbucket.org/x/x/src/master/
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://bitbucket.org/x/x/src/master/'
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.
 git status
On branch master
nothing to commit, working tree clean

Ustawić coś w ustawieniach SSH na bitbuckecie?

0

A ten pull ci się poprawnie połączył z tym co masz lokalnie? Bo masz przecież "Updates were rejected because the remote contains work that you do not have locally".

1 użytkowników online, w tym zalogowanych: 0, gości: 1