Giter Site home page Giter Site logo

git-context-switch's Introduction

git-context-switch

git-context-switch is a context switch for git

git-context-switch makes git able to manage multiple branch-lists and stash-lits (called "context").

Demo

Demo

Dependencies

Emacs (>=24), as an interpreter.

Installation

Make git-context-switch.el executable visible from PATH

cp git-context-switch.el /usr/local/bin/git-context-switch
chmod +x /usr/local/bin/git-context-switch

and (optionally) add an alias to ~/.gitconfig.

[alias]
context = "!f() { git-context-switch $*; }; f"

Usage

git-context-switch have following subcommands:

  • git context ... Show current context name
  • git context list ... Show list of all all contextsx.
  • git context create <name> ... Create new context.
  • git context delete <name> ... Delete context.
  • git context switch <name> ... Switch to context.
  • git context show <name> ... Show list of branches.
  • git context mv <branch> <context> ... Move branch to context.
  • git context cp <branch> <context> ... Copy branch to context.

mv and cp commands accept following arguments in addition:

  • mv foo-context:foo-branch bar-context ... Specify context to move (copy) branch from
  • mv foo-branch bar-context:foofoo-branch ... Specify branch name to move (copy) to

git-context-switch's People

Contributors

zk-phi avatar

Stargazers

Duncan Freeman avatar Hagihara Ryosuke avatar Oleg Pykhalov avatar Yuki Ito avatar

Watchers

James Cloos avatar  avatar  avatar

git-context-switch's Issues

`git checkout` when switching context

Updating HEAD when switching context, is done by just copying refs/contexts/<name>/HEAD to HEAD, workdir is not updated and marked dirty.

We should use git checkout when switching context.

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.