Skip to content

Commit

Permalink
.some
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Nov 15, 2024
1 parent 902fb9b commit 2446508
Show file tree
Hide file tree
Showing 12 changed files with 935 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v2
- run: deno lint src/app.ts
Empty file added .gitignore
Empty file.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deno.enable": true
}
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Git Gud

A package manager for leveling up your git experience.

## Usage

| Interface | Solution |
|-----------|-----------|
| GUI | [teaBASE] |
| CLI | `brew install pkgxdev/made/git-gud` or `pkgx mash git-gud --help` |

```sh
$ git gud --help
```

> [!WARNING]
> All addons are pretty new and may not be careful in how they integrate.
>
> Always `git gud vet <addon>` before using it.
## Supported Platforms

We support what `pkgx` supports, though some integrations are literally macOS
apps so…

## Requirements

`git` obv. Addons may also require both [`pkgx`] and/or [`brew`]. Use
[teaBASE] to get these set up.

## Contribution

We use “fork scaling”.
Fork this repo, add a new entry in addons and submit a pull request.

The YAML format is pretty self-explanatory. Read some of the files for
examples.

### Testing

```sh
$ code addons/your-addon.yaml
$ export GIT_GUD_PATH="$PWD"
$ ./src/app/ts i your-addon
```

## What’s With the Name?

The phrase “git gud” is a colloquial way of saying “get good” and is often
used in gaming communities to mockingly encourage someone to improve their
skills or adapt after struggling or failing repeatedly.

[teaBASE]: https://github.com/pkgxdev/teaBASE
[`pkgx`]: https://pkgx.sh
[`brew`]: https://brew.sh
31 changes: 31 additions & 0 deletions addons/DS_Ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name:
.DS_Ignore

type:
configuration

description:
Never accidentally commit a `.DS_Store` file again.

elaboration:
Installs a global gitignore file and configures git to use it.

caveats: |
You should still add `.DS_Store` to your `.gitignore` file if you are
likely to work with other macOS users now or in the future. Using this
addon means should you forget to do that at least you aren’t the one
committing these files.
#TODO read config, check resulting file for .DS_Store
sniff:
- test -f "${XDG_CONFIG_HOME:-$HOME/.config}"/git/ignore

install:
- mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}"/git
- echo ".DS_Store" >> "${XDG_CONFIG_HOME:-$HOME/.config}"/git/ignore
- git config --global core.excludesfile "${XDG_CONFIG_HOME:-$HOME/.config}"/git/ignore

#TODO only remove our one-line
uninstall:
- rm "${XDG_CONFIG_HOME:-$HOME/.config}"/git/ignore
- git config --global --unset core.excludesfile
27 changes: 27 additions & 0 deletions addons/aicommits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
description:
Generate your commit messages via OpenAI.

#TODO
# use local AI. Realistically this requires a way to run a LocalLLM server
# which is not currently trivial. teaBASE could support setting up such
# daemons in a usable way which this could then depend upon.

usage:
- "`OPENAI_KEY` must be set in your shell environment."
- We provide the alias `git ai`. This invokes the underlying `aicommits`
tool the project provides.

homepage:
https://github.com/Nutlope/aicommits

type:
extension

sniff:
git config --global alias.ai

install:
git config --global alias.ai !"pkgx npx --yes aicommits"

uninstall:
git config --global --unset alias.ai
17 changes: 17 additions & 0 deletions addons/fork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description:
A modern, capable, native GUI complement for the git CLI.

homepage:
https://git-fork.com

type:
app

sniff:
mdfind "kMDItemCFBundleIdentifier == 'com.DanPristupov.Fork'"

install:
brew install --cask fork

uninstall:
brew uninstall --cask fork
20 changes: 20 additions & 0 deletions addons/git-extras.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
description:
Extras for Git; repo summary, REPL, changelog, author metrics & more

homepage:
https://github.com/tj/git-extras

elaboration:
https://github.com/tj/git-extras/blob/main/Commands.md

type:
extension

sniff:
brew list git-extras

install:
brew install git-extras

uninstall:
brew uninstall git-extras
21 changes: 21 additions & 0 deletions addons/git-wip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
description:
Commits all changes to a single commit w/message ”wip”.

elaboration:
Is this good practice? No.
Should you use this? No.
Do you care? That’s your call.

type:
alias

# TODO verify it is unmodified from our pristine string
sniff:
git config --global alias.wip

install: >
git config --global alias.wip
!"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\""
uninstall:
git config --global --unset alias.wip
Loading

0 comments on commit 2446508

Please sign in to comment.