-
Notifications
You must be signed in to change notification settings - Fork 117
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
rebis-dev: Why 3402 commits ahead of, 3394 commits behind master? #2570
Comments
I created the |
Still, it seems that the branches should/could have many more commits in common. Maybe this can be reflected somehow to make it clearer what the branches actually have in common. Maybe you @Skgland know how to do this? I would greatly appreciate if you could look into this. |
Oh no, this looks bad. Based on a a visualized commit graph The main problem I see are all the things from The only thing I can come up with that might work, but which will definitely be tedious, would be to
|
Not that it helps, but maybe |
Can't we just make a new branch from |
Thank you for all suggestions and comments! Almost everything would be better than the situation we have now, where the branches are presented almost as if they don't have anything in common. We have many issues and discussions that link to commits in master, and it seems worthwhile to keep as many of them working as possible. Even if we can only preserve the existing commits in master up to somewhere in 2023, it would already be a huge improvement. P.S.: Especially since in 2023, we already had a |
The following may be a way out: We can simply add all $ git fetch origin $ git checkout master && git commit -a $ git diff origin/master origin/rebis-dev | git apply $ git add src/functor_macro.rs $ git commit -a $ git push origin master:rebis-dev --force $ git reset --hard HEAD^ ExplanationFirst, make sure everything is up to date, $ git fetch origin $ git checkout master && git commit -a Then, apply all changes of $ git diff origin/master origin/rebis-dev | git apply At this point, I get the following messages:
I have ignored these messages, they do not influence the end result. At this point, all changes of rebis-dev are applied to the repository, but not yet committed. To these changes, add the file
Now, commit all these changes with: $ git commit -a This yields a single big commit (69 files changed, ca. 10_000 insertions and deletions) on top of master. The commit will look like this: triska@bd919dd The result (i.e., master with this commit applied) is exactly identical to the remote rebis-dev branch. Verification: $ git diff origin/rebis-dev $ (i.e., empty diff) At last, push master to the remote rebis-dev branch:
And then reset master to its original state by undoing the topmost commit which contains the rebis-dev changes:
I think the result is acceptable, much better than destroying the existing commit history of several years, especially since commit IDs are also used in commit messages and discussions that refer to them. |
This generates the diff between master and rebis-dev, |
To clarify: After these steps, At the end, we are conceptually in exactly the same position as we are now: There are new changes in Any changes that happened in the last few weeks must be integrated when (eventually) merging |
When I visit https://github.com/mthom/scryer-prolog/tree/rebis-dev, github shows:
This branch is 3402 commits ahead of, 3396 commits behind master.
Why such unexpectedly high numbers? The two branches share almost all commits, I expect rebis-dev to contain almost all commits from master, with possibly a few rare exceptions of recent commits that are no longer relevant for rebis-dev. Note that master itself has only 3884 commits, and rebis-dev has 3890 commits at the moment.
The text was updated successfully, but these errors were encountered: