Giter Club home page Giter Club logo

bunchofgits's Introduction

BunchOfGits

A rust command line application for managing polyrepo madness

Project Goals:

  • Learn Rust
  • Learn how to build a CLI tool
  • Develop a deeper understanding of git and version control
  • Make some friends along the way

Problem Statement

It can be very cumbersome to jungle dependent branches across different repositories when working in a highly distributed repository. Call them poly-repos or multi-repos, it doesn't matter, the cost of constantly switching branches across multiple repos to get your computer to a specific devlopment state can be a enormous.

I'm imagining:

  • a templating system for common workflows
  • a way to switch to a set of branches quickly (hopefully in one command no matter how many branches)
  • not having to worry about stashing/poping

We will leverage git worktrees and a custom cli tool(operating under the working name BunchOfGits, and called with

buncha [Options] 

Teaser For What is To Come:

$buncha --help

-----------------------

Quickly switch between git repositories and specified branches to get your machine to the
right state for the feature or bug changes you care about right now. Bookmarks for git workflows.
Just a bunch of gits.

Usage: bunch_of_gits <COMMAND>

Commands:
  add       Adds the current repository to a specific bunch
  switch    Switch to the bunch configuration specified
  list      List all available bunch configurations and their settings
  init      Initialize bunch of gits with a new config file
  new       Create a new bunch
  template  Set up a template
  help      Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

bunchofgits's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

bunchofgits's Issues

Custom Commands

  • ability to attach scripts to other cli commands as pre or post command actions. Ex. compile after build, swap out .dll files, change other software settings

Config Files

  • dot file at user root directory for global settings

Command Line Interface

Use Clap: https://docs.rs/clap/4.3.0/clap/

Commands

  • init
  • go (take in a bunch name, and then run needed commands to switch over all the branches)
  • prev (go to the previous bunch) (only got back and forth, it is less like undo, and more like a carousel)
  • add (to bunch)
  • new (create new set of branches in repos based on bunch template)
  • remove (branch from bunch)
  • config (opens toml config file in text editor to set global settings) or flags/args inline to set
  • pull (switch to branches from bunch collection, and pull down latest, just fail on merge conflicts)
  • push(switch to brances from bunch collection, and push to remote, does not handle tracking files or committing -- user to do this)
  • template (takes in arguments vector of repo names to be used for common development workflows) ex. three repos are commonly involved in each feature development. allow for quickly creating a branch on each of the repos of the same name
  • list (list all currently defined bunches, hold up to 15?)

Options

  • set build command/file config for the repos to be used on switch

Thought: Open and Unsaved Files

What to do when a file in VS or VIM or VSCode, or wherever is opened and unsaved. All work will be lost on branch change. Is there anyway to detect which process owns the file at the moment, and force a save?
Or should we just ignore this case and trust that users are aware of their save status of their files?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.