1.2.4 • Published 2 years ago

@qiwi/git-sync v1.2.4

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

@qiwi/git-sync

Git helper to fetch & push dirs. For everything else there is nodegit.

Usage

JS API

import { gitSync } from '@qiwi/git-sync'

// Upload
await gitSync({
  action: 'push',
  from: './docs',
  to: './',
  brach: 'gh-pages',
  url: 'https://https://github.com/some/repo.git',
  env: {
    GIT_TOKEN: 'token'
  }
})

// Download
await gitSync({
  action: 'fetch',
  url: 'https://https://github.com/some/repo.git',
  brach: 'gh-pages',
  from: './',
  to: './docs',
  env: {
    GIT_TOKEN: 'token'
  }
})

CLI

Fetch from remote to local:

GIT_TOKEN='token' gitsync --url='https://https://github.com/some/repo.git' --action='fetch' --from='./' --to='./docs' --branch='gh-pages'

the same via ssh:

GIT_SSH_COMMAND='ssh -i private_key_file -o IdentitiesOnly=yes' gitsync --url='git@github.com:some/repo.git' --action='fetch' --from='./' --to='./docs'

Push local dir to remote:

GIT_TOKEN='token' gitsync --action='push' --from='./docs' --to='./' --branch='gh-pages'

License

MIT

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago