Skip to main content

For managing that one annoying remote file you can't put under version control

Project description

You know the feeling. You’re making a quick dirty hack to a file on a remote machine. The file isn’t under version control. You want to have the convenience of editing the file locally, and you want the ability to roll back your changes. Putting the remote file under version control is just too hard, so what do you say? fuggit.

Specifically:

fuggit add remote.hostname.com/etc/file.name

this will grab /etc/file.name from the machine remote.hostname.com; save it as remote.hostname.com/etc/file.name under $PWD. The file will be added and committed to git.

fuggit pull remote.hostname/etc/file.name

can be used to refresh your local copy of the file. Any local changes will be preserved; any remote changes will result in a new commit.

fuggit vimdiff remote.hostname/etc/file.name

will open a vimdiff window showing your local working copy of the file and the remote copy. Thanks to the magic of vim, any changes you make to the remote file will be pushed to the servce once you close the file. Any local changes will be left for you to commit as you see fit.

Installation

Before you can use fuggit, you’ll have to do a spot of basic setup.

You’ll want to create a directory to use for your local history:

mkdir localhistory
cd localhistory
git init .

You’ll need to perform all fuggit commands from this directory. As you add files you’ll get one directory under this base for each host you’re managing files on.

You could install fuggit system-wide:

sudo pip install fuggit

Or you could create a virtualenv inside your localhistory directory and install it there:

virtualenv .
source bin/activate
pip install fuggit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuggit-0.0.3.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file fuggit-0.0.3.tar.gz.

File metadata

  • Download URL: fuggit-0.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fuggit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 42013415e585c86758f216ec2cf738f4983910397eced1cbd425b3a5e0cea6a1
MD5 bdda5c6472129e22714b474f7bb95840
BLAKE2b-256 77b9f953197511b165851e4a4663d104699ad0dab6b8fb18c836fdd953d68e30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page