-
Notifications
You must be signed in to change notification settings - Fork 4
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
add rebase how-to steps and one per branch suggestion #97
Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/epiverse-trace/tutorials/compare/md-outputs..md-outputs-PR-97 The following changes were observed in the rendered markdown documents:
What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2023-12-20 11:55:54 +0000 |
steps for how to rebase in local and remote repositories
c3aef90
to
9df13a4
Compare
@Bisaloo after finishing with the edits in the PR, in parallel I merged #95. This made visible the Update with Rebase option, so I did it, labelling the last commit as "force-pushed" as expected. Then, in my local repo, I did
At this moment I stopped and avoided pushing this content to GitHub. I imagine this would add a merge commit in the PR history and disallow the "rebase and merge" option. |
To avoid this, you need to run You can also change your global settings via |
That step was the missing bit in the process. Thanks! |
CONTRIBUTING.md
Outdated
- Keep your feature branch up to date with `main`. | ||
- This encourage to keep the history as linear as possible, prioritizing actions like ["rebase and merge"](https://epiverse-trace.github.io/blueprints/git-branching-merging.html#merging-pull-requests-merge-commits-vs-squash-and-merge-vs-rebase-and-merge) to accept the PR. |
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.
Keeping in sync with main
may not be necessary in most cases. git/GitHub is very good at identifying potential sources of conflicts and unless you get a message saying you have conflicts that you need to solve, rebasing your branch or merging the main
branch into feature
is extra work for (almost) no gain.
The linearity of this history is unrelated to our well you keep in sync with main
. It is ensured by the absence of merge commits in the history.
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.
Typically, in the present PR, it was probably not necessary to rebase on main
, even after your latest commits. You can do it, but it's an extra source of potential mistakes.
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.
From all these experiences, I confirm that this added unintentional extra mistakes.
So, I think we could change the "Keep your feature branch..." line as an optional action:
If you need to get the latest commits in the
main
branch to use them in your development, we recommend rebasing your feature branch. This will keep to commit history linear.
- In the local repository...
- switch...
- pull...
...- In the remote...
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.
Yes, sounds perfect!
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.
added in 0ac8b03
this follows the suggestion in #97 (comment)
this follows the suggestion in #97 (comment)
this follows the suggestion in epiverse-trace/tutorials#97 (comment)
This updates the steps for:
These modifications will propagate to all workbench-based repositories.