Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- phd/code/
- phd/figures/
- phd/thesis/
- cd phd/code
- git commit
- cd ../figures
- git commit
- cd phd
- git commit
- cd phd
- git init
- git add [[everything that's already in my other repositories]]
- $ cp -r phd phd-backup
- $ cd phd/code
- $ git filter-branch --index-filter
- 'git ls-files -s | sed "s-t-&code/-" |
- GIT_INDEX_FILE=$GIT_INDEX_FILE.new
- git update-index --index-info &&
- mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
- phd
- |_code
- | |_.git
- | |_code
- | |_(your code...)
- |_figures
- | |_.git
- | |_figures
- | |_(your figures...)
- |_thesis
- |_.git
- |_thesis
- |_(your thesis...)
- $ cd phd
- $ git init
- $ git pull code
- $ rm -rf code/code
- $ rm -rf code/.git
- $ git pull figures
- $ rm -rf figures/figures
- $ rm -rf figures/.git
- $ git pull thesis
- $ rm -rf thesis/thesis
- $ rm -rf thesis/.git
- phd
- |_.git
- |_code
- | |_(your code...)
- |_figures
- | |_(your figures...)
- |_thesis
- |_(your thesis...)
- $ cd phd/code
- $ git mv code code-repository-migration
- $ git commit -m "preparing the code directory for migration"
- $ cd phd
- $ git mv code/code-repository-migration code/code
- $ git commit -m "final step for code directory migration"
- $ cd phd/code
- $ mkdir code
- # This won't work literally, because * would also match the new code/ subdir, but you understand what I mean:
- $ git mv * code/
- $ git commit -m "preparing the code directory for migration"
- $ cd ../..
- $ mkdir phd.all
- $ cd phd.all
- $ git init
- $ git pull ../phd/code
- ...
- git init
- git add *
- git commit -a -m "import everything"
- Rewrite 422a38a0e9d2c61098b98e6c56213ac83b7bacc2 (1/42)mv: cannot stat `/home/.../wikis/nodows/.git-rewrite/t/../index.new': No such file or directory
Add Comment
Please, Sign In to add comment