What does it mean that push git cannot be quickly merged?

Could someone provide a simple example of what would lead to Git crashing to the central repo, because fast forward cannot happen? What will be the local repo against the central repo state so that it looks to make this happen? There are actually problems with visualizing this ...

+5
source share
2 answers

I assume you see this problem:

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to '/Users/mayoff/t/test/central'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

Here, as the “non-transitional updates were rejected” problem, the problem occurs.

, . , , . :

initial synchronized repos

. :

private repos have new commits

:

central repo updated by Alice

. 3. 4. commit 4 3 , , git push , " ", . , , -, , .

, :

Bob has fetched Alice's commit

( # 4) (commit # 3), , :

Bob has merged the commits

(git fetch, git merge) (git pull).

, , .

Bob pushed the merge

, . , , , , , , .

+11

, . .

0

All Articles