<commit_before># Twit: training wheels for git

Twit makes [git](http://git-scm.com) easier for beginners.

## Installation

To install, simply run:

    gem install twit

(On some systems, this may require `sudo`.)

## Usage

### `init` -- create a new repository

    twit init

Initialize a new git repository in the current directory.

### `save` -- take a snapshot of all files

    twit save <DESCRIBE_CHANGES>

Take a snapshot of all files in the directory.

Any changes on the working tree will be committed to the current branch.

## API

All command-line functions are available for use as a Ruby library as well.

    require 'twit'

    # Create a new repository
    repo = Twit.init

    # Make some changes to the directory
    File.open('foo', 'w') { |f| f.write('bar\n') }

    # Take a snapshot
    Twit.save "Add some foo"

## Development

### Setup

Clone the repository.
<commit_msg>Add planned commands to README<commit_after># Twit: training wheels for git

Twit makes [git](http://git-scm.com) easier for beginners.

## Installation

To install, simply run:

    gem install twit

(On some systems, this may require `sudo`.)

## Usage

### `init` -- create a new repository

    twit init

Initialize a new git repository in the current directory.

Equivalent to: `git init`

### `save` -- commit all new changes to the current branch

    twit save [DESCRIBE_CHANGES]

Take a snapshot of all files in the directory.

Any changes on the working tree will be committed to the current branch.

Equivalent to: `git add --all && git commit -m <DESCRIBE_CHANGES>`

### `saveas` -- commit all new changes to a new branch

    twit saveas [NEW_BRANCH] [DESCRIBE_CHANGES]

Equivalent to: `git checkout -b <NEW_BRANCH>` then `twit save`

*Not yet implemented.*

### `open` -- open another branch

    twit open [BRANCH]

Equivalent to: `git checkout <branch>`

*Not yet implemented.*

### `include` -- incorperate changes from another branch

    twit include [OTHER_BRANCH]

Incorperate changes from another branch, but do not save them yet. (The user
can resolve any conflicts and then run `twit save` themselves.)

Equivalent to: `git merge --no-ff --no-commit [OTHER_BRANCH]`

*Not yet implemented.*

### `discard` -- permanently delete unsaved changes

    twit discard

**Permanently** delete any unsaved changes to the current branch. Be careful!

Equivalent to: `git reset --hard`

*Not yet implemented.*

### `list` -- show all branches

    twit list

Equivalent to: `git branch`

*Not yet implemented.*

## API

All command-line functions are available for use as a Ruby library as well.

    require 'twit'

    # Create a new repository
    repo = Twit.init

    # Make some changes to the directory
    File.open('foo', 'w') { |f| f.write('bar\n') }

    # Take a snapshot
    Twit.save "Add some foo"

## Development

### Setup

Clone the repository.

{'fraction_non_alphanumeric': 0.09861111111111111, 'fraction_numerical': 0.0, 'mean_word_length': 3.3519637462235647, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7270453', 'n_tokens_mistral': 903, 'n_tokens_neox': 873, 'n_words': 380}