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

Code used to extract history from Julia repository #1

Closed
nalimilan opened this issue Sep 27, 2019 · 0 comments
Closed

Code used to extract history from Julia repository #1

nalimilan opened this issue Sep 27, 2019 · 0 comments

Comments

@nalimilan
Copy link
Member

The repository was created from the Julia repository, keeping only the stdlib/Statistics directory and history related to stdlib/Statistics, base/statistics.jl and test/statistics.jl.
For reference, the commands are:

# https://ptc-it.de/move-files-to-new-repo-in-git/#
 git filter-branch --prune-empty --index-filter \
      'git ls-tree -z -r --name-only --full-tree $GIT_COMMIT | \
       grep -z -v "stdlib/Statistics" | \
       grep -z -v "base/statistics.jl" | \
       grep -z -v "test/statistics.jl" | \
       xargs -0 -r git rm --cached -r' -f &> log

# https://stackoverflow.com/questions/9803294/prune-empty-merge-commits-from-history-in-git-repository
git filter-branch --prune-empty --parent-filter \
    'sed "s/-p //g" | xargs -r git show-branch --independent | sed "s/\</-p /g"'
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

1 participant