Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samth/git-slice
Slicing git repositories.
https://github.com/samth/git-slice
Last synced: 1 day ago
JSON representation
Slicing git repositories.
- Host: GitHub
- URL: https://github.com/samth/git-slice
- Owner: samth
- Created: 2014-08-20T21:34:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T17:33:53.000Z (over 6 years ago)
- Last Synced: 2025-01-28T22:35:14.096Z (3 days ago)
- Language: Racket
- Homepage:
- Size: 26.4 KB
- Stars: 22
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-racket-and-scheme - git-slice
README
# For slicing git repositories
### Warning!
This performs permanent modification to your git repository! Be careful.
### Installation
```
raco pkg install git-slice
```### Sample use:
```
$ cd my-repo
$ racket -l git-slice subdir
```This destructively updates `my-repo` to only include `subdir`.
It performs multiple steps, which can be split out as follows:
```
$ mkdir /path/to/tmp-data
$ cd my-repo
$ racket -l git-slice/compute subdir /path/to/tmp-data
$ racket -l git-slice/filter /path/to/tmp-data
$ racket -l git-slice/chop /path/to/tmp-data
```The `git-slice/filter` and `git-slice/chop` steps can take a long
time. They can be sped up by using a ramdisk: see [here][1] for Linux
instructions to set one up, and then add `-d /tmp/ramdisk/scratch` as
an additional argument. This is also supported for the `git-slice`
command itself. The provided path must not yet exist.`git-slice` can be provided a second argument for a temporary
directory to use to store metadata files. If not provided, a temporary
directory is created. This directory is _not_ removed after slicing.The `--dry-run` command can be provided to any command to see what it
would do without doing any permanent damage.[1]: http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/