From 28dd482cd7806835c7f6662bcc3f32cee9d7e0b7 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 2 Jun 2015 21:55:40 +0300 Subject: [PATCH] Add a paragraph about push and fast-forward --- pep-git.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pep-git.txt b/pep-git.txt index 46b7053..a4b957b 100644 --- a/pep-git.txt +++ b/pep-git.txt @@ -236,8 +236,17 @@ git guesses (knowing upstream remote branches) that you really want $ git push origin v1:v1 v2:v2 -Git pushes commits to the remote repo and updates remote branches. It -is possible to configure git to make it push a few branches or all +Git pushes commits to the remote repo and updates remote branches. Git +refuses to push commits that aren't fast-forwardable. You can +force-push anyway, but please remember - you can force-push to your +own repositories but don't force-push to public or shared repos. If +you find git refuses to push commits that aren't fast-forwardable, +better fetch and merge commits from the remote repo (or rebase your +commits on top of the fetched commits), then push. Only force-push if +you know what you do and why you do it. See the section `Commit +editing and caveats`_ below. + +It is possible to configure git to make it push a few branches or all branches at once, so you can simply run :: -- 2.39.5