Code Monkey home page Code Monkey logo

git-aware-terminal's Introduction

Deprication Warning

This project still works but is no longer being maintained. This would make us cry as well, except the reason we are depricating it is because we have the same functionality in a much easier to use container:

https://www.npmjs.com/package/git-aware-terminal

Git Aware Terminal

At Zetta we love Git. It's like adding a third dimension to your world when you've been living in two. However, as powerful as it is, it requires a great deal of effort to learn and be effective at, and even if you are already a git master it still takes extra seconds here and there to maintain your awareness of what status your project is in.

Enter the Git Aware Terminal.

Video demo:
Video demo

It is a little scripting combined with a little design to yeild a much more usable git experience.

Git aware prompt views ย 
Our non-git directory prompt looks like this. Git is not initialized for this directory:
Basic terminal
When we go into our git project directory:
Git terminal
An untracked file:
untracked file
A modified, unadded file:
File Delta
A file pending commit:
Pending commit
Post commit we are now one commit ahead of remote origin:
One ahead
A coworker just pushed a change, now after a fetch we se we're behind by one:
One behind
Just created a new local branch that doesn't exist on remote:New branch
A currently detached repo:
Pending commit

Installation

  1. cd ~/ (or wherever you'd like the directory to be created)

  2. git clone https://github.com/zeg-io/git-aware-terminal.git
    - OR -
    Download and save git-aware-terminal.bash to your ~/ directory or wherever you like.

  3. Edit your bash config. In OSX it is located here: ~/.bash_profile.
    Add the following to the top of your file and save it. Clearly you can change the path of the script to wherever you clone the repo to if you'd like.

    if [ -f ~/git-aware-terminal/git-aware-terminal.bash ]; then
        . ~/git-aware-terminal/git-aware-terminal.bash
    fi
    PROMPT_COMMAND="parse_git_branch"
    ...
    

    Ensure that you aren't already using PROMPT_COMMAND= and if you are, just add parse_git_branch; ... to it.

  4. Run . ~/.bash_profile to reload your terminal and enable the newly added code, or close your terminal and restart it.

git-aware-terminal's People

Contributors

mwieder avatar zeg-io avatar

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.