Skip to content

Commit d1471e0

Browse files
wkinggitster
authored andcommitted
user-manual: give 'git push -f' as an alternative to +master
This mirrors existing language in the description of 'git fetch'. Signed-off-by: W. Trevor King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9b4908 commit d1471e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Documentation/user-manual.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,6 +2045,13 @@ branch name with a plus sign:
20452045
$ git push ssh://yourserver.com/~you/proj.git +master
20462046
-------------------------------------------------
20472047

2048+
Note the addition of the `+` sign. Alternatively, you can use the
2049+
`-f` flag to force the remote update, as in:
2050+
2051+
-------------------------------------------------
2052+
$ git push -f ssh://yourserver.com/~you/proj.git master
2053+
-------------------------------------------------
2054+
20482055
Normally whenever a branch head in a public repository is modified, it
20492056
is modified to point to a descendant of the commit that it pointed to
20502057
before. By forcing a push in this situation, you break that convention.

0 commit comments

Comments
 (0)