Skip to content

Instantly share code, notes, and snippets.

Avatar

Gabriel Fair gabefair

View GitHub Profile
@gabefair
gabefair / git.migrate
Created May 2, 2020 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
View git.migrate
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@gabefair
gabefair / restore_packages.R
Created Aug 5, 2018 — forked from arne-cl/restore_packages.R
save/load/install a list of your currently installed R packages
View restore_packages.R
# restore_packages.R
#
# installs each package from the stored list of packages
# source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/
load("~/installed_packages.rda")
for (count in 1:length(installedpackages)) {
install.packages(installedpackages[count])
}
You can’t perform that action at this time.