From 08a1bcf9f860ba5b8c3bb3122ccbf3fa82d08811 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 7 Jan 2021 12:00:07 +0300 Subject: Extend git evacuation procedure --- xtask/tests/tidy.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'xtask') diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index d1ffb70ad..7e5b1f7b5 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -107,8 +107,13 @@ When updating a pull-request, please rebase your feature branch on top of master by running `git rebase master`. If rebase fails, you can re-apply your changes like this: - # Abort in-progress rebase, if any. + # Just look around to see the current state. + $ git status + $ git log + + # Abort in-progress rebase and merges, if any. $ git rebase --abort + $ git merge --abort # Make the branch point to the latest commit from master, # while maintaining your local changes uncommited. @@ -117,10 +122,17 @@ you can re-apply your changes like this: # Commit all changes in a single batch. $ git commit -am'My changes' + # Verify that everything looks alright. + $ git status + $ git log + # Push the changes. We did a rebase, so we need `--force` option. # `--force-with-lease` is a more safe (Rusty) version of `--force`. $ git push --force-with-lease + # Verify that both local and remote branch point to the same commit. + $ git log + And don't fear to mess something up during a rebase -- you can always restore the previous state using `git ref-log`: -- cgit v1.2.3