Skip to content

vdutts7/gitty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitty icon

gitty

git add, commit, and push in one command

from any dir, for any repo

GitHub npm


ToC

    About
    Install
    Usage
    Contact

About

Problem

  • agents often edit lots of repos on my machine at once
  • I often bounce across multiple repos in a singular work session:
    • adding little features here and there (mini-tasks for agent to do in background unattended)
    • remembering todos, editing READMEs, other chores
    • brilliant ideas
    • tangents
  • want frequent checkpoints because agents go rogue and overwrite important stuff- devastating if you had a brilliant idea (or agent nukes something that isn't already protected by shelllock)
  • need several mini-rollbacks/snapshots but cd-ing into each repo and then running git add / commit / push over and over is friction

Solution

  • gitty is one command: stage all → commit → force-push
  • run from any directory for any repo- pass repo root or get prompted
    • no cd
    • no && chaining
  • checkpoint repo B while in repo A
    • drop a quick save before/after an agent run- always have a rollback

Summary

  • one command: git add, git commit -m <msg>, git push -f
  • from any dir, for any repo (pass path/to/repo/root or get prompted)
  • built for agent-heavy workflows- fast checkpoints across many repos

Install

npm i -g @vd7/gitty

Usage

gitty [commit_mssg] [root_dir]
Arg Description
commit_mssg Commit message (prompted if omitted; default ..)
root_dir Repo root to operate on (prompted if omitted; default $PWD)- checkpoint a repo without leaving your current dir

Examples

gitty "fix bug" /path/to/repo
gitty "checkpoint" $HOME/projects/other-repo   # save other-repo while elsewhere
gitty "wip"                                 # message only; root = $PWD
gitty                                      # prompts for both
  • uses git push -f- overwrites remote
  • use when you want a checkpoint, not shared history

Demo

  • make a change
  • run gitty with no args- answer prompts
  • watch it stage, commit, and push
# make a change
touch "$HOME/projects/example-repo/test.txt"
# run (no args -> prompts)
gitty
Enter commit message [default: ..]: added XYZ feature
Enter root directory (absolute path) [default: /Users/you/projects/example-repo]:

# output (abbreviated)
Detecting changed files..
Staging changes...
[main b309cba] added XYZ feature
 create mode 100644 test.txt
- Force pushing to remote...
To github.com:vdutts7/example-repo.git
🟢 Successfully added, committed, and pushed changes from /Users/you/projects/example-repo

Contact

vd7.io   /vdutts7

About

git add, commit, and push in one command from any dir, for any repo

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages