0.0.1 • Published 7 years ago

ghitte v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

ghitte

git dynamic submodules

NPM Version NPM Downloads

JS Standard Style

NPM

Description

ghitte allow to keep synchronized submodules on commit, pull and push in a single command.
If you want to work on project jointly to submodules, you can touch files and ghitte will keep all aligned. It not interfere with git, so you can use the full set of git command as usual.

Install

npm i -g ghitte

On Ubuntu run also

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install libstdc++-4.9-dev

Usage

  • init
    create .ghitte.json file with interactive setup; add submodules here or editing .ghitte.json file.
cd /path/to/my/project
ghitte init
(...output)
  • pull all
    perform git pull on main project and each submodule from source point, that can be a commit, a branch or a tag.
ghitte pull
(...output)
  • commit all
    if you touch files both in main project and submodule, using ghitte commit it commit all the interested repositories and ignore the untouched ones.
    Commit on submodules are performed on destination branch configured on .ghitte.json file.
ghitte commit -am "feature done"
(...output)
  • push all
    perform git push on main project and each submodule to destination branch.
ghitte push
(...output)
  • add submodule add a submodules, specifying name, path and source point ( a commit, a branch or a tag). ghitte will download it and insert a rule in .gitignore to the path.
    You can also add a submodule manually in .ghitte.json and run ghitte pull.
ghitte add (...args)
(...output)
  • remove submodule
    remove a submodule by name from .ghitte.json and from .gitignore, ask to remove the path directory.
    You can perform these operations manually.
ghitte rm submodule-name
(...output)

API

init (todo)

ghitte init

create .ghitte.json file with interactive setup

  • Add submodule?
  • Submodule name:
  • path:
  • url:
  • ?auth:
  • source point (commit:hash, branch:name, tag:name):
  • sync? y/n:
    • sync on commit? y/n:
    • sync on push? y/n:
    • sync on pull? y/n:
    • destination point (branch name):

clone

(todo authentication)

ghitte clone url-to-repository.git

clone the main repository and if there is .ghitte.json clone each repositories. (NB recursive - if circularity is found, won't clone submodules) default src is branch.master

add (todo)

rm (todo)

commit (todo)

pull (todo)

push (todo)


References

MIT License

Copyright (c) 2016-2017 Simone Sanfratello

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.