git-upload-changes

Upload your changes from your latest commits to a server using SSH.

Usage no npm install needed!

<script type="module">
  import gitUploadChanges from 'https://cdn.skypack.dev/git-upload-changes';
</script>

README

git-upload-changes

This is a simple command line utility that allow you to upload all the files that you changed locally to a remote server.

Installation:

$ npm install -g git-upload-changes

Usage:

Usage: git-rsync [OPTIONS] REMOTE

Upload all the files that you changed locally to a remote server.

Options:

    -n, --commits    Use the lastest N commits.

    -h, --help       Display this page.
    -v, --version    Display the version number and exit.

REMOTE should be an ssh:// - URL, optionally containing the SSH password. If you do not want to expose your passwords in your history, you can omit it. The program will prompt you for your password instead.

All files will be uploaded using your git directory as the base. For example, if you change src/index.js in your repository and specify user@example.com:/home/user/project/ as your REMOTE, the file will be uploaded to /home/user/project/src/index.js.

NOTE: Existing files on your server WILL GET OVERRIDEN by this tool. Also, it does not check for additional uncommited changes before uploading. Please make sure all the files are ready to be uploaded before running this program.