1.7.0 • Published 6 years ago

git-slice v1.7.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

git-slice

npm version npm

Please be aware that one of git-slice dependencies nodegit doesnot properly work with Node 9.x, therefore until this problem is resolved we recommend that you to use Node 8.x instead.

This utility can be used to take out folder(s) from a git repository, fork it into a new git repository and eventually provide commands to sync changes between both repositories.

Commands

git-slice init

Optiions

OptionInputRequiredAllow Multiple
--repoRelative path of the git repository to be slicedYESNO
--branchName of the repository branch to be slicedYESNO
--folderPath of the folder from the repository rootYESYES
$ git-slice init frontent-public --repo ./../main-repo --folder src/frontend/public --folder src/frontend/Components/Login --branch develop

This command creates a new folder in the current directory and initiates a new git repository in it. In this case it will copy all the content from main-repo/src/frontend/public and main-repo/src/frontend/Components/Login, and places it in frontend-public/src/frontend/public and frontend-public/src/frontend/Components/Login respectively. In addition, this command also creates a config file frontend-public/git-slice.json to store configuration details.

git-slice pull

$ cd frontend-public
$ git-slice pull

If main-repo/src/frontend/public is updated, this command can be used to sync the updates into frontend-public/src/frontend/public.

git-slice push

$ cd frontend-public
$ git-slice push --branch updated-photos --message "changed public photos" --author-name "XYZ" --author-email "xyz@xyz.com"

Options

OptionInputRequired
--branchName of the branch to be created in the main git repository while pushingYES
--messageCommit mesasge used to commit changes in the main git reposiroryYES
--author-nameName of the author which will be used to commit in the main repositoryYES
--author-emailEmail of the author which will be used to commit in the main repositoryYES

If frontend-public/src/frontend/public is updated, this command can be used to create a new branch named updated-photos in main-repo and sync the changes made in frontend-public/src/frontend/public to that branch. Later, a pull request can be created to merge these changes with the master branch.

1.7.0

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

7 years ago