Giter Site home page Giter Site logo

git-md's Introduction

Git-md

A tool to locally synchronize your hackmd notes. Experimental: use at your own risk, but report bugs!

Quick-start

  1. Generate a Hackmd token, <token>
  2. Create a directory (and make it readable by the docker container)
$ mkdir .git_md
$ chmod a+rw .git_md   # Could be more specific to the docker container
  1. Start the docker image,
$ docker run --rm -v ~/.git_md:/home/git -p 2222:22 panglesd/git_md

3.5. Ssh into the docker container to set up some things ...

$ ssh git@localhost -p 2222
$ git config --global user.email "[email protected]"
$ git config --global user.name "Your Name"
$ exit

`

  1. Clone your hackmd, for instance into the hackmd directory
$ git clone ssh://git@localhost:2222/home/git/<token> hackmd

Now, each git pull will pull your notes from hackmd (as a single commit) and each push will update the notes (if your local repo is up to date)

More information

git_md can work on two setup:

  • local modes, where git-md pull -t <token> and git-md push -t <token> will pull and push your notes back and forth your computer and the hackmd instance. Uses timestamps to not send and receive too many notes. Use with care, conflicts are not detected at all!
  • git mode, with git-md upload-pack and git-md receive-pack replacing the server-side git commands, to have a git server as a gateway to your hackmd notes.

The docker image is a simple ssh server where the git upload-pack and git receive-pack have been replaced by their git-md counterpart.

TODO: explain how it works under the hood.

git-md's People

Contributors

panglesd avatar

Stargazers

Sonja Heinze avatar  avatar Marcello Seri avatar Thibaut Mattio avatar Guilherme avatar Lucas Pluvinage avatar Puneeth Chaganti avatar Sora Morimoto avatar Jules Aguillon avatar Patrick Ferris avatar  avatar

Watchers

 avatar  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.