Skip to content

A PHP CLI tool designed to export commits from a Git repository.

License

Notifications You must be signed in to change notification settings

johansatge/git-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Exporter

A PHP CLI tool designed to export commits from a Git repository.


Installation

Checkout the project or download the tool directly from Github:

curl https://raw.githubusercontent.com/johansatge/git-exporter/v0.2.0/GitExporter.php > gitexporter
chmod +x gitexporter
sudo mv gitexporter /usr/local/bin

Usage

Check the installation

gitexporter --version
> GitExporter version 0.2.0

Export the changes between two commits

cd /path/to/some-git-repository
gitexporter diff 07840746ad77cbbfc580413eea46de19387f7ef0 HEAD

This will export all modified files between 0784074 (non-inclusive) and HEAD (inclusive) in a .export directory, in the root of the project.

The directory will also contain a _changelog.txt file with the list of the modified and deleted files.

Specify an output directory

cd /path/to/some-git-repository
gitexporter diff 07840746ad77cbbfc580413eea46de19387f7ef0 HEAD --dir=some-export-dir

This will create the some-export-dir directory in the root of the Git project.

Changelog

Version Date Notes
0.2.0 January 04th, 2015 Adds a shebang and make installation more simple
0.1.1 July 25th, 2014 Refactors calls to count(), adds the makeDirTreeForFile() function
0.1 January 21th, 2014 Initial version

License

This project is released under the MIT License.

About

A PHP CLI tool designed to export commits from a Git repository.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages