summaryrefslogtreecommitdiffstats
path: root/software
diff options
context:
space:
mode:
Diffstat (limited to 'software')
-rw-r--r--software/git.page18
1 files changed, 18 insertions, 0 deletions
diff --git a/software/git.page b/software/git.page
index 3f4e3ef..ffad5ed 100644
--- a/software/git.page
+++ b/software/git.page
@@ -18,3 +18,21 @@ copy ``hooks/post-update.sample`` to ``hooks/post-update``.
To add links from gitweb, add to the ``@git_base_url_list`` list in the
configuration file.
+
+Copying Files Between Repositories with History
+------------------------------------------------
+
+Create a branch with only python files (slow; ignore the very verbose "won't
+delete directory" output):
+
+ git checkout -b filtered-commits
+ git filter-branch -f --prune-empty --tree-filter 'find . -not -iname "*.py" -exec rm {} \;' filtered-commits
+
+In the receiving repo:
+
+ git pull path/to/source/repo
+
+See also:
+
+http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
+http://superuser.com/questions/164362/git-keep-changelog-for-file-when-moving-to-a-different-repository