All Projects → lesnitsky → Git Tutor

lesnitsky / Git Tutor

Licence: other
+md=❤️ Awesome tutorials from your git log

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Git Tutor

Choo Handbook
🚂✋📖 - Learn the choo framework through a set of exercises
Stars: ✭ 266 (-29.26%)
Mutual labels:  markdown, tutorial
Fullstackpython.com
Full Stack Python source with Pelican, Bootstrap and Markdown.
Stars: ✭ 2,667 (+609.31%)
Mutual labels:  markdown, tutorial
Lambda The Cli Way
AWS Lambda using CLI, an introductory cookbook
Stars: ✭ 188 (-50%)
Mutual labels:  markdown, tutorial
Sublimetutor
An interactive in-editor keyboard shortcuts tutorial for Sublime Text 3
Stars: ✭ 336 (-10.64%)
Mutual labels:  markdown, tutorial
Userge
Userge, Durable as a Serge
Stars: ✭ 363 (-3.46%)
Mutual labels:  tutorial
Pygame tutorials
Code to go along with lessons at http://kidscancode.org/lessons
Stars: ✭ 363 (-3.46%)
Mutual labels:  tutorial
Insane
😾 Lean and configurable whitelist-oriented HTML sanitizer
Stars: ✭ 360 (-4.26%)
Mutual labels:  markdown
Csharp Data Visualization
Code examples and notes for displaying data with C#
Stars: ✭ 355 (-5.59%)
Mutual labels:  tutorial
Letter Boilerplate
Finest letter typesetting from the command line
Stars: ✭ 374 (-0.53%)
Mutual labels:  markdown
Capsnet Visualization
🎆 A visualization of the CapsNet layers to better understand how it works
Stars: ✭ 371 (-1.33%)
Mutual labels:  tutorial
Richtext
Android平台下的富文本解析器,支持Html和Markdown
Stars: ✭ 3,715 (+888.03%)
Mutual labels:  markdown
Notes
✎ Distraction-free notes and writing
Stars: ✭ 363 (-3.46%)
Mutual labels:  markdown
Gatsby Theme Code Notes
A Gatsby theme for publishing code-related notes to your website
Stars: ✭ 370 (-1.6%)
Mutual labels:  markdown
Blender Scripting
Introduction to blender scripting
Stars: ✭ 362 (-3.72%)
Mutual labels:  tutorial
Judo Heroes
A React application to showcase rendering with Universal JavaScript
Stars: ✭ 373 (-0.8%)
Mutual labels:  tutorial
For Editor
for-editor - A markdown editor based on React
Stars: ✭ 358 (-4.79%)
Mutual labels:  markdown
Marpit
The skinny framework for creating slide deck from Markdown
Stars: ✭ 364 (-3.19%)
Mutual labels:  markdown
Mistletoe
A fast, extensible and spec-compliant Markdown parser in pure Python.
Stars: ✭ 368 (-2.13%)
Mutual labels:  markdown
Numpy Tutorial
Numpy beginner tutorial
Stars: ✭ 365 (-2.93%)
Mutual labels:  tutorial
Pytorch Custom Cuda Tutorial
Tutorial for building a custom CUDA function for Pytorch
Stars: ✭ 369 (-1.86%)
Mutual labels:  tutorial

Git Tutor

lesnitsky.dev Build Status GitHub stars Twitter Follow

Git Tutor Logo

Generate step-by-step markdown tutorials from your git history

Motivation

There is tons of tutorials on medium, personal blogs etc. Writing detailed and complete guide how to build things is kinda hard and people are lazy, so those tutorials sometimes incomplete, code examples don't work as-is (some "prerequisite" step was not included in tutorial), sometimes it walks you through only some pieces of code and you can find the rest in repo. But you have no idea how the rest works.

Git is a perfect tool to build smth incrementally (commits). git-tutor walks through commit history and generates markdown, placing commit message first, content of a commit afterwards. Write markdown to your commit messages – have a nice tutorial later with single command

Example tutorials

Some rules

  • keep commits small and explain almost every line of code you're writing
  • write markdown to your commit messages
  • don't skip anything. Simple copy-paste should work to reproduce the result of your tutorial
  • writing code is fun. Explaining how code works is even more of fun

Installation

npm i -g nodegit
npm i -g git-tutor

Usage

git-tutor . > README.md

Tips and tricks

I don't like commiting every line of code. What should I do to keep tutorial clean?

That's fine, I don't like it either. You can use git add -p and split your work into smaller chunks later

Git treats # as a comment by default

To be able to use this symbol and add headings you should reconfigure git cleanup symbol

git config commit.cleanup whitespace

What if I want to leave general comment/explanation without any code

Git allows commits without any content

git commit --allow-empty

How to use my favorite editor for writing markdown

Writing a lot of markdown is not really convenient in default git editor like vi, I prefer doing it in vscode as it allows to preview parsed markdown with all styling applied. To use vscode as git editor

  • Install code command in $PATH (Shift + CMD + P => Search for PATH)
  • git config core.editor "code --wait"

Default commit message template contains status in comment, how to remove it

You can pass --no-status flag to a commit command, this will strip those commented lines

git commit --no-status

You can also use your custom commit template:

  • create empty file and place it somwhere in your file system (e.g. ~/.gitmsg)
  • git config commit.template ~/.gitmsg

Unsolved issues

  • i18n (cherry-pick to new locale branch with translation?)
  • updates to previous commits (rebase works, but not convenient)
  • collobaration

LICENSE

WTFPL

lesnitsky.dev GitHub stars Twitter Follow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].