Giter Site home page Giter Site logo

git_quine's Introduction

git_quine

A program that recreates its own repository. Why? Because fun!

Table of Contents

Install

How do you mean? It's a quine. It produces itself as output. There is nothing to install.

Motivation

Bäärenkatapulte!

Usage

Just run it! It should produce exactly the same commits on every platform.

$ ls -a
.git .gitignore git_quine.py  LICENSE  README.md
$ ./git_quine.py
Git repository created in git_quine/
$ ls git_quine/
.git .gitignore git_quine.py  LICENSE  README.md
$ diff -su <(git rev-parse HEAD) <(git -C git_quine/ rev-parse HEAD)
Files /dev/fd/63 and /dev/fd/62 are identical

Stand-alone

To prove that it doesn't just copy the files, I encourage you to take git_quine.py, move it somewhere else, delete the repository, and run the quine. You will see that it reproduces the entire repository without access to anything else.

Feature support

This quine supports arbitrary commit messages and times, added files, and changes to files.

Naturally, it can't reproduce all features of git. Most importantly, this quine currently only understands history as a single branch, consisting only of single-parent commits. Also, this quine is its own author and committer, because that simplifies things.

Diffs are stored inefficiently.

If you take a deep dive into how this quine works, you will see that these missing features can be easily added.

Contribute

Feel free to dive in! Open an issue or submit PRs.

git_quine's People

Contributors

benwiederhake avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.