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

Migrating to r-gregmisc organization #5

Open
arni-magnusson opened this issue Feb 25, 2020 · 0 comments
Open

Migrating to r-gregmisc organization #5

arni-magnusson opened this issue Feb 25, 2020 · 0 comments

Comments

@arni-magnusson
Copy link
Member

arni-magnusson commented Feb 25, 2020

Hi Greg,

Below is a method we can use to migrate packages to the r-gregmisc organization. Note that in the following example using gdata, we end up destroying the local repository ~/git/warnes/r-gregmisc on our hard drive, but everything remains intact on https://github.com/warnes/r-gregmisc.

A. Create an empty repository gdata on https://github.com/r-gregmisc. I do this manually in a web browser.

B. Open a shell and run:

# 1 Environment variables
FROM=~/git/warnes/r-gregmisc
TO=~/git/r-gregmisc
PACKAGE=gdata

# 2 Create a stripped-down FROM repo that only includes gplots history
cd `dirname $FROM`
git clone git@github.com:warnes/r-gregmisc.git
cd $FROM
git remote rm origin  # make sure we don't destroy anything on GitHub
git filter-branch --subdirectory-filter $PACKAGE -- --all

# 3 Clone TO repo
cd $TO
git clone git@github.com:r-gregmisc/$PACKAGE.git
cd $PACKAGE

# 4 Transfer
git remote add transfer $FROM
git fetch transfer
git branch temp remotes/transfer/master
git merge --allow-unrelated-histories temp
git remote rm transfer
git branch -d temp
git push origin master

# 5 Remove stripped-down repo
rm -rf $FROM

C. Tag releases, edit repo description, add README.md, etc.

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