1 README for archives2git
2 =======================
4 `archives2git` is intended to recreate a poor-man's history from the (release)
5 archives of a project. It is an sh script that commits the given file archives
6 to a Git repository as a series of commits; by default the commit (sub-)trees
7 will replicate the contents of their corresponding archive.
9 For the documentation see the manual of linkpage:archives2git[1] (or the help
10 message output), the examples below, then look inside the config file example
11 link:archives2gitrc[example] and finally inside the link:archives2git[script].
18 cd git-repo # may be a subdir of the toplevel of a repo
19 GIT_AUTHOR_NAME="Firstname Lastname" GIT_AUTHOR_EMAIL=user@host \
20 archives2git ../oldproject-?.??.tar.gz
22 Some possible options:
24 archives2git $(ls ../oldproject-*.tgz | sort -V)
25 --keep-filter 'test x.gitignore = x"$file"'
26 # keep (only) the .gitignore file
27 --keep-filter 'echo "$file" | grep -q -f $HOME/filepats'
28 --rename 'echo "${file%-*}"'
29 # suppress the version info from the root directory in the archive
31 # allow to add ignored files
32 --date 'LC_ALL=C date -r "$arch"'
33 # use the archive modification time as the author date (with GNU date)
34 --title 'echo "${arch##*/}"'
35 # do not include the path components in the commit title
37 # interactively edit each commit message
38 --gitfilter $'--subdirectory-filter\noldproject'
39 # keep only the files of the project in the root of the tree
40 --gitfilter $'--tree-filter\nmv oldproject/.* .; mv oldproject/* .'
41 # move the project's files out of their subdir (while keeping other files)
46 * Trailing newlines in file names are not supported.
53 * `aunpack` from link:http://www.nongnu.org/atool/[atool]