<commit_before>
# env-tracker

## **\*\*WORK IN PROGRESS\*\***

Adds source-control features to important .gitignore'd files in your project.


## Motivation

Source control is awesome. If you don't think so, maybe this isn't the project for you.

Unfortunately, a whole heckin' lot of projects require top secret files that shouldn't be checked into source control.
Those files often have names like `.env` (and looks a whole lot like `.env-example`, but with real data!) 
and they contain all of your secrets: passwords, database connection details, api keys, and that 
embarrassing thing you said like five years ago and oh god I hope no one remembers that... etcetera etcetera.

Or, maybe you have some configuration files or scripts or macros for your project that you wrote for your own 
local dev environment to make your life easier.
You can't very well check those into your project either, because that would just be rude.

So what do you do? 

You add your private files to `.gitignore` and hope you don't accidentally delete them 
and always remember to keep a copy/pasted copy of any values that you change in the line below 
or manually keep backups
so that you don't "oh crap I closed that window after changing that config value yesterday on my feature branch
and now my undo buffer's cleared 
and now my config is broken after checking out the develop branch
and what was that dev api key again for that service that we had and then removed and just re-added?"

**Source control is awesome, but best practices dictate that some of your most important files 
are second class citizens that aren't allowed to benefit from source control**. 

Env Tracker aims to change that by being a simple tool that lets you use source control on your important .gitignore'd files. 

## How does it work?

Most basically, Env Tracker works something like this:

- Create a git repository outside of your project repository
- Any .gitignore'd files you wish you could keep source-controlled are moved to the second repository where they can reap the benefits of source control.
- Those files are then symlinked back to their original location.
- As far as your project is concerned, nothing has changed.

If you're more of a code reading person, you could manually replicate the main 
features of Env Tracker by performing the following steps manually in your shell:

```bash
# Create a second repository for your project to house all of your ignored files
mkdir -p ~/.et/my-project
cd ~/.et/my-project
git init

cd path/to/my-project

# Create a secret file that you don't want to include in 
touch secret-file.txt
echo "secret password" > secret-file.txt
echo "secret-file.txt" >> .gitignore

# move your secret file to the second repository
mv secret-file.txt ~/.et/my-project/

# create a symlink in the files original location which points to the file
ln -s ~/.et/my-project/secret-file.txt secret-file.txt
```  

## Installation

Coming soon

## Configuration

Coming soon

## Caveats

- Only works on git repos

???

## CLI Methods

Coming soon

## Development
<commit_msg>more typos<commit_after>
# env-tracker

## **\*\*WORK IN PROGRESS\*\***

Adds source-control features to important .gitignore'd files in your project.


## Motivation

Source control is awesome. If you don't think so, maybe this isn't the project for you.

Unfortunately, a whole heckin' lot of projects require top secret files that shouldn't be checked into source control.
Those files often have names like `.env` (and looks a whole lot like `.env-example`, but with real data!) 
and they contain all of your secrets: passwords, database connection details, api keys, and that 
embarrassing thing you said like five years ago and oh god I hope no one remembers that... etcetera etcetera.

Or, maybe you have some configuration files or scripts or macros for your project that you wrote for your own 
local dev environment to make your life easier.
You can't very well check those into your project either, because that would just be rude.

So what do you do? 

You add your private files to `.gitignore` and hope you don't accidentally delete them 
and always remember to keep a copy/pasted copy of any values that you change in the line below 
or manually keep backups
so that you don't "oh crap I closed that window after changing that config value yesterday on my feature branch
and now my undo buffer's cleared 
and now my config is broken after checking out the develop branch
and what was that dev api key again for that service that we had and then removed and just re-added?"

**Source control is awesome, but best practices dictate that some of your most important files 
are second class citizens that aren't allowed to benefit from source control**. 

Env Tracker aims to change that by being a simple tool that lets you use source control on your important .gitignore'd files. 

## How does it work?

Most basically, Env Tracker works something like this:

- Create a git repository outside of your project repository
- Any .gitignore'd files you wish you could keep source-controlled are moved to the second repository where they can reap the benefits of source control.
- Those files are then symlinked back to their original location.
- As far as your project is concerned, nothing has changed.

If you're more of a code reading person, you could manually replicate the main 
features of Env Tracker by performing the following steps manually in your shell:

```bash
# Create a second repository for your project to house all of your ignored files
mkdir -p ~/.et/my-project
cd ~/.et/my-project
git init

cd path/to/my-project

# Create a secret file with some secret passwords that you don't want github to see
touch secret-file.txt
echo "env tracker is awesome" > secret-file.txt
echo "secret-file.txt" >> .gitignore

# Move your secret file to the second repository
mv secret-file.txt ~/.et/my-project/

# Create a symlink in the files original location which points to the file in its new home
ln -s ~/.et/my-project/secret-file.txt secret-file.txt
```  

## Installation

Coming soon

## Configuration

Coming soon

## Caveats

- Only works on git repos

???

## CLI Methods

Coming soon

## Development

{'fraction_non_alphanumeric': 0.05510796003867225, 'fraction_numerical': 0.0, 'mean_word_length': 4.017784963621665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1288012', 'n_tokens_mistral': 1639, 'n_tokens_neox': 1557, 'n_words': 961}