-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TASK] Polish the git rebasing section in CONTRIBUTING.md
#1387
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,20 +142,20 @@ To rebase a feature branch to the latest `main`: | |
1. Make sure that your local copy of the repository has the most up-to-date | ||
revisions of `main` (this is important, otherwise you may end up rebasing to | ||
an older base point): | ||
```sh | ||
git checkout main | ||
```bash | ||
git switch main | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New in Git 2.23 - additional separate commands added to declutter the overloaded functionality of |
||
git pull | ||
``` | ||
1. Switch to the (feature) branch to be rebased and make sure your copy is up to | ||
date: | ||
```sh | ||
git checkout feature/something-cool | ||
```bash | ||
git switch feature/something-cool | ||
git pull | ||
``` | ||
1. Consider taking a copy of the folder tree at this stage; this may help when | ||
resolving conflicts in the next step. | ||
1. Begin the rebasing process | ||
```sh | ||
```bash | ||
git rebase main | ||
``` | ||
1. Resolve the conflicts in the reported files. (This will typically require | ||
|
@@ -168,8 +168,8 @@ To rebase a feature branch to the latest `main`: | |
|
||
If there were no conflicts, skip this and the next step. | ||
1. Mark the conflicting files as resolved and continue the rebase | ||
```sh | ||
git add *.* | ||
```bash | ||
git add . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I understand, this means that |
||
git rebase --continue | ||
``` | ||
(You can alternatively use more specific wildcards or specify individual | ||
|
@@ -180,7 +180,7 @@ To rebase a feature branch to the latest `main`: | |
If there are more conflicts to resolve, repeat the previous step then this | ||
step again. | ||
1. Force-push the rebased (feature) branch to the remote repository | ||
```sh | ||
```bash | ||
git push --force | ||
``` | ||
The `--force` option is important. Without it, you'll get an error with a | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was missed in #1366.