git2folder
is a Command-Line Interface to extract branches of a git repository into folder and vice versa.
git2folder
is usable with the Command-Line Interface way
$ npm install git2folder -g // For CLI use
Launch the CLI by calling:
$ git2folder [options] <extract|update>
The command line utility has 2 possibles arguments=. You can view help detailed by running git2folder -h
.
Usage: git2folder [options]
Options:
-h, --help output usage information
-V, --version output the version number
git2folder provides 2 actions :
extract
: to copy all branches of a repository on a targeted folderupdate
: to create one branch per directory on a targeted git repository
Branches develop
and master
are ignored, the git repository must have at least a master
branch
WARNING : the
extractFolder
is cleaned whenextract
is called andbranches
are destroyed onupdate
.
WARNING : the
update
command use the local folders in an alphabetical order.
each action prompts questions :
gitFolder
: to indicate git repository folder (relative to current dir)extractFolder
: to indicate the directory where branches will be extracted or where it should take folder (depending of the action)
Imagine you have a working directory trainings
:
├── trainings
└──
│ ├── angular-tps
│ └── typescript-tps
And you want to extract all the branches of typescript-tps
, stay at the root of trainings
, make a tmp directory, and launch git2folder:
mkdir typescript-tps-tmp
git2folder extract
> ./typescript-tps
> ./typescript-tps-tmp
Work on the updates you want, and after reload git2folder with update
command
git2folder update
> ./typescript-tps
> ./typescript-tps-tmp
ISC License
Copyright (c) 2017 Groupe SII