Roland's homepage

My random knot in the Web

Moving scripts to a private repo

date: 2015-05-14
reading time: 2 min.
category: problems
tags: git

Some of the scripts in my scripts directory are private because they contain personally identifying or security relevant information, or are just not useful for others without modifications. So I decided not to publish it on github as-is, but to make a private repo for scripts that are not for general use.

What I did was create a fast-export stream for the files that are suitable for publication.

cd ~/src/scripts
git fast-export HEAD -- \ \ \ \ \ \ \ >../

This was then imported into a fresh directory.

cd ~/src
mkdir public-scripts
cd public-scripts
git init .
git fast-import <../

In the original (now private) repo, I used git rm to remove the files that are now in the public repo. I did not bother trying to expunge the complete history of those files.

For comments, please send me an e-mail.

Related articles

←  Making my first e-book Converting RCS history to git  →