@spyz/simple-git-sync

1.1.4 • Public • Published

simple-git-sync

Node.js package built off of simple-git. Periodically auto-pull remote changes, then push local changes to gitHub.

1. Install 'git' on your device, https://git-scm.com/downloads

2. Make sure to initialize your git project first by doing the following:

  • Open command prompt in your localBranchPath folder.
  • Type 'git config credential.helper store'
  • Type 'git init'
  • Enter your gitUsername and password to authenticate your account.

3. Type 'npm install simple-git-sync'

4. Usage:

const gitSync = require('simple-git-sync');

gitSync.syncGit('gitUsername', 'gitRepo', 'gitBranch', 'LocalMainFilename', 'localBranchPath');

//gitSync.syncGit('Brandon10x15', 'simple-git-sync', 'Test', 'pm2', 'App.js', '...');

Tips:

Leaving runningProcess blank will automatically set the running process to 'npm', this is used to restart your App. Change to 'pm2' or 'forever' if you are using another.

Leaving localMainFilename blank will automatically set the main app name to 'App.js', this is used to restart your App.

Leaving localBranchPath blank will automatically use the current projects folder.

Dependents (0)

Package Sidebar

Install

npm i @spyz/simple-git-sync

Weekly Downloads

1

Version

1.1.4

License

MIT

Unpacked Size

4.38 kB

Total Files

4

Last publish

Collaborators

  • brandon10x15