Skip to content
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

Having a clean and coherent git history #15

Open
illwieckz opened this issue Jul 1, 2015 · 2 comments
Open

Having a clean and coherent git history #15

illwieckz opened this issue Jul 1, 2015 · 2 comments

Comments

@illwieckz
Copy link
Contributor

Hi, the current git history is weird. First thing, svn did not know what is an author/committer address so this information is missing. Second thing, There is plenty of useless anonymous empty commits done by a previous cvs2svn conversion. And there is some other issues too.

cleaning the noise

I've rebased the whole history on a personal branch:

The useless anonymous commits by cvs2svn are gone, and some redundant initial commits are squashed up. For example, the 6 commits between the first and the 8th are just pure noise.

crediting authors

I've used this conversion table to credit authors:

  • l-n <l-n@bac25679-d237-0410-bec6-f8029acc7ebe>
    Ludwig Nussel <ludwig.nussel(ad)suse.de>
  • <stevejankowski@bac25679-d237-0410-bec6-f8029acc7ebe>
    Steve Jankowski <stevejankowski(ad)yahoo.com>
  • smolarek <smolarek@bac25679-d237-0410-bec6-f8029acc7ebe>
    Pierre Smolarek <smolarek(ad)users.sourceforge.net>

The direct consequence is contributors will be automatically linked if they are on Github too.
You can see as an example how Ludwig Nussel was automatically recognized.
Also, contributors will be automatically added to the QStat's contributor page.

You can see how it looks on the XQF's contributor page, contributors from the past were automatically recognized, even if they contributed only one commit.

So, in this history rewrite for Qstat, author date and committer date are preserved, committer name and email use author mail and email. If you know better email adresses for Steve Jankowski and Pierre Smolarek I can rewrite them.

release tags

I've added release tags: https://github.com/illwieckz/qstat/releases

problems and solutions

There is just a big problem, the whole history is rewritten, so you can't merge that change, you must force-push it which is bad when a repository is well-known and have many forks because it break merge. But currently, this not a problem for the QStat git repository. 😉

It's a problem for forks, they will not be able to merge after the rewrite. But I'm probably the only one who have some forks to merge, so I'm ok to handle this case myself. I'm already merging by hand a fork which were never based on the current git repository, so, the problem is already there.

If you want to rewrite the history, we just have to notice the rare people who have forked it to just drop their fork and to refork them. Github knows only 3 public forks, one of them is me, the second is well behind the current master and the third was just created yesterday and we are in touch with him.

So, since the repository is not yet known, if you want to do it can do it now, later will be too late.

There is one issue remaining, if one maintainer from a distribution have configured a package build procedure to checkout one specific commit. There is a solution to that: you can branch your master before rewriting it and keep this branch online for historical purpose.

@nyov nyov mentioned this issue Nov 26, 2016
@stevenh
Copy link
Contributor

stevenh commented Nov 26, 2016

Happy to do this if you can detail the full command line steps

@vorot93
Copy link
Contributor

vorot93 commented Jan 5, 2017

@stevenh

  1. git clone https://github.com/illwieckz/qstat.git -b rewrite-history
  2. Apply all commits from this repo after bca7d6b.
    2.1. git format-patch bca7d6b.. in old repo dir.
    2.2. Move all patch files to Thomas' repo dir.
    2.3. git apply {*}.patch in Thomas' repo dir
  3. Change origin to this repo and do force push.
    3.1. sed -i 's/illwieckz/multiplay/g' .git/config
    3.2. git push --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants