https://github.com/opcode81/git-split
a simple script for splitting the git history of a file
https://github.com/opcode81/git-split
Last synced: about 1 year ago
JSON representation
a simple script for splitting the git history of a file
- Host: GitHub
- URL: https://github.com/opcode81/git-split
- Owner: opcode81
- Created: 2020-03-04T11:40:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-04T11:49:25.000Z (over 6 years ago)
- Last Synced: 2025-03-27T05:25:03.314Z (about 1 year ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-split
**a simple script for splitting the git history of a file**
As source files grow larger, it can be desirable to split them into several more manageable files that correspond to reasonable logical units. Within a git repository, each new file should ideally retain the history of the file it was copied from.
For instance, if a file `foo.src` is to be split into `foo_bar.src` and `foo_baz.src`, we can use **git-split** to achieve this by performing the following steps:
$ sh git-split.sh foo.src foo_bar.src
$ git mv foo.src foo_baz.src
After these two steps, both files will have the same history as `foo.src`, and we can start deleting the content we don't need from them.