Git Product home page Git Product logo

gitshit's Introduction

Gitshit: A Lazy Approach to 'Git' Shit Done

  • Gitshit is a library designed to make life easier when using basic git commands repetitively:
        git add <filename>
        git commit -m "Commit Message"
        git status
        git push origin <branch-name>

can now be replaced by

        gitshit done

There are, of course, caveats to this oversimplification.

  • Gitshit offers the option to combine all of this into a single command but additionally allows users to add the correspending command-line options for each of the parameters i.e. <filename>, "Commit Message", and <branch-name>

The complete set of use-cases for Gitshit are illustrated below

  1. gitshit done : Uses default settings committing all files to the master branch with a pre-defined commit message "Adding changes to file"

This was the primary reason behind the development of gitshit.

Command-line Options

  • -f or --filename is used to provide absolute or relative filepaths for committing individual files. The default setting for this option is to place all modified files in a single commit using --all.

  • -m or --commit-message is used to add a custom message to the current commit. The default message is "Adding changes to file".

  • -b or --branch-name is used to commit to a custom branch. The default value for this option is master.

Rolling back

  • While laying out a design for gitshit, I realized that shit can go wrong when chaining together these commands so I plan to add a soft and hard rollback option using a wrapper for the git reset command.

To be fair, I was originally going to make a new script called shitgit but I realized it was (probably) overkill (albeit funny). Maybe I'll do it anyway.

Further development will mainly be motivated by the need to induce automation into my daily routine but I will most certainly attempt to publish scripts that help someone other than myself.

I am well aware that this entire repo could be replaced simply by adding a function/alias to my .bashrc file but my motivation in creating a separate repo was to use it for a tutorial that I intend to organize next year (once I'm back in India) in order to help freshmen and sophomores learn more/develop an interest in how the command-line works the hard way before introducing the concept of aliases, environment variables, and the .bashrc file.

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.