about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorzahash <zahash.z@gmail.com>2023-08-29 15:43:15 +0530
committerTshepang Mbambo <tshepang@gmail.com>2023-08-30 10:02:41 +0200
commit68c9afec4eb8b0265b381e14619dc923cb2e77eb (patch)
tree259ee48492a9a31c49cc7192df4a5bcd28c6b782 /src/doc/rustc-dev-guide
parente14c7eabb76c5ba7a88b0785ec0def622d9fb64f (diff)
downloadrust-68c9afec4eb8b0265b381e14619dc923cb2e77eb.tar.gz
rust-68c9afec4eb8b0265b381e14619dc923cb2e77eb.zip
1675 move 'failed to push some refs' into its own section
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/git.md34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/doc/rustc-dev-guide/src/git.md b/src/doc/rustc-dev-guide/src/git.md
index 579459bdf24..4208305a914 100644
--- a/src/doc/rustc-dev-guide/src/git.md
+++ b/src/doc/rustc-dev-guide/src/git.md
@@ -201,6 +201,24 @@ and just want to get a clean copy of the repository back, you can use `git reset
 git reset --hard master
 ```
 
+### failed to push some refs
+
+`git push` will not work properly and say something like this:
+
+```
+ ! [rejected]        issue-xxxxx -> issue-xxxxx (non-fast-forward)
+error: failed to push some refs to 'https://github.com/username/rust.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.
+```
+
+The advice this gives is incorrect! Because of Rust's
+["no-merge" policy](#no-merge-policy) the merge commit created by `git pull`
+will not be allowed in the final PR, in addition to defeating the point of the
+rebase! Use `git push --force-with-lease` instead.
+
 ### Git is trying to rebase commits I didn't write?
 
 If you see many commits in your rebase list, or merge commits, or commits by other people that you
@@ -306,22 +324,6 @@ Git know that you've resolved the conflicts and it should finish the rebase.
 Once the rebase has succeeded, you'll want to update the associated branch on
 your fork with `git push --force-with-lease`.
 
-Note that `git push` will not work properly and say something like this:
-
-```
- ! [rejected]        issue-xxxxx -> issue-xxxxx (non-fast-forward)
-error: failed to push some refs to 'https://github.com/username/rust.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.
-```
-
-The advice this gives is incorrect! Because of Rust's
-["no-merge" policy](#no-merge-policy) the merge commit created by `git pull`
-will not be allowed in the final PR, in addition to defeating the point of the
-rebase! Use `git push --force-with-lease` instead.
-
 ### Keeping things up to date
 
 The above section on [Rebasing](#rebasing) is a specific