Skip to content

Instantly share code, notes, and snippets.

@onefork
onefork / prosemirror_monorepo.sh
Created May 7, 2020 13:17
ProseMirror Monorepo with Nx
#!/usr/bin/env bash
#
# Prerequisites:
# git, node, yarn, nx, jq
#
repos_dir=repos
workspace=pm
pm_dir=prosemirror
@onefork
onefork / revert-a-commit.md
Last active September 5, 2018 11:27 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

<a href="https://www.stw.berlin/wohnraumbörse/inserate.html">Wohnraumbörse Berlin</a>
<div id="steckbrief-232" class="steckbrief table-responsive" style="display: inline-block;">
<table class="table table-condensed">
<tbody><tr>
<td colspan="2" class="bold" style="background-color:#c5c5c5">Inserat #232 3,3 km</td>
</tr>
<tr>
<td colspan="2"><span class="bold">1 Zimmer</span> in<br>Lützowplatz, 10787 Berlin<br>(Mitte)</td>
</tr>
<tr>
@onefork
onefork / 99-login-lancom
Last active January 10, 2017 22:15 — forked from cusspvz/99-login-fon
LANCOM auto-login bash script wget client openwrt
#!/bin/sh
# place this file at: /etc/hotplug.d/iface/99-login-lancom
# Configurations
LANCOM_USERNAME=email%40domain.com
LANCOM_PASSWORD=123456
LANCOM_DELAY_UP=3
COOKIE_JAR_PATH=/tmp/lancom-cookie-jar.$INTERFACE
. /lib/functions.sh