Lewis,
What you want to do is possible but is not relative to BBEdit.

Git can only track files at the root of the repo so since you are wanting 
to track files all over the drive, that makes it more difficult.  Please DO 
NOT create a git repo at /

I have a similar setup what you are trying to do.  Here is what I've done.
In /usr/local/etc/, create a new git repo. (I called mine dotfiles since I 
was originally tracking only my .files but it has since expanded to other 
system files too)
Now you can move the files to track into /usr/local/etc/dotfiles/ and 
create hard or soft links back to their original location.

Now anytime you make a change to the files, jump into the 
/usr/local/etc/dotfiles/ directory and commit the changes.
An automated option could be to create a script (called by cron.daily) that 
runs 'git status --porcelain' in the dotfiles repo and if any results are 
found, it commits all changes.
It would need to generate a commit message so as Steve mentioned, one of 
the best features of versioning is that the commit messages explain what 
was changed.  In this case, the messages wouldn't matter but at least you 
would have a history of your changes.


On Saturday, June 18, 2016 at 1:11:42 PM UTC-6, Lewis Butler wrote:
>
> I know that I can setup BBEdit to talk to a git repository. Or at least I 
> know that in theory. 
>
> What I would like to do is setup a git repository for all of the “Unix” 
> files that I edit. things like /etc/hosts /etc/postfix/* /Users/*/.bashrc 
> /usr/local/bin/* and others so that when I edit my bashrc or a shell script 
> or postfix configurations I have a way to roll back to previous versions. 
>
> OK. 
>
> BUT. I don’t always edit these files with BBEdit. Sometimes it’s because 
> I’m already in the shell and “this will only take a second” and others it 
> is because I am logged in via ssh. 
>
> So, is there a way to setup git so that it basically automatically watches 
> an arbitrary list of files and directories and just does its magic in the 
> background that would work regardless of if I use BBEdit, vim, text 
> wrangler, TextEdit, or whatever? 
>
> A bit off-topic, perhaps, but I figure if anyone knows it will be you lot. 
>
> Of course, in 10.13 this will all happen automagically through the power 
> of APFS, but until then… 
>
> -- 
> 'Somewhere, A Crime Is Happening,' said Dorfl. --Feet of Clay 
>
>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.

Reply via email to