Coder Social home page Coder Social logo

git-some's Introduction

git-some

Build Status

A little helper script to quickly generate git commits.

Usage

git some [number of commits] will generate number of commits commits in the current directory.

Every commit creates one file named <x>.txt, where x is a string representing the current commit number, from A to Z and AA to ZZ, etc.

If you omit number of commits, git some will default to generate one commit. git some will not overwrite exiting files, but rather try to generate files that do not exist yet.

Installation

Somewhere on your machine (preferably your home directory), execute the following commands:

$ git clone https://github.com/GROSSWEBER/git-some.git
$ cd git-some
$ ./install

install will set up the git some alias for you.

Git training attendees

It is useful to have some aliases ready save some typing:

git gl

git gl displays the whole graph.

git config --global alias.gl 'log --oneline --graph --all'

git diverged

git diverged creates the graph that we mostly use as a base for our discussion. It looks like the one below.

git config --global alias.diverged '!git init && git some 2 && git checkout -b topic && git some 3 && git checkout - && git some'

I'm not using git switch here because you might have an older Git client (< 2.23) that only supports git checkout.

Example

$ mkdir git-some-test

$ cd git-some-test

$ git init
Initialized empty Git repository in <somewhere>/git-some-test/.git/

$ git some 2 &&
  git checkout -b topic &&
  git some 3 &&
  git checkout - &&
  git-some
[master (root-commit) c540e60] master: A.txt
...

$ git log --oneline --graph --all
* 90ace40 (HEAD -> master) master: F.txt
| * 94042dd (topic) topic: E.txt
| * 8eb1751 topic: D.txt
| * 2c4b9f0 topic: C.txt
|/
* 644d9b9 master: B.txt
* c540e60 master: A.txt

git-some's People

Contributors

agross avatar heinisturm avatar mcr42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

heinisturm

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.