Skip to content

Instantly share code, notes, and snippets.

@ensisf
ensisf / revert_a_merge.md
Created December 29, 2020 10:30 — forked from lifuzu/revert_a_merge.md
revert a merge commit that's already pushed to remote branch

The -m option specifies the parent number. This is because a merge commit has more than one parent, and Git does not know automatically which parent was the mainline, and which parent was the branch you want to un-merge.

When you view a merge commit in the output of git log, you will see its parents listed on the line that begins with Merge:

commit 8f937c683929b08379097828c8a04350b9b8e183
Merge: 8989ee0 7c6b236
Author: Ben James <ben@example.com>
Date:   Wed Aug 17 22:49:41 2011 +0100

Merge branch 'gh-pages'
// Глобальный счётчик запросов
let lastRequest = 0
export function send (...args, callback) {
// Запоминаем какой номер у этого запроса
const thisRequest = ++lastRequest
fetch(...args).then(responce => {
// Игнорируем ответ, если номер этого запроса
// не совпадает с номером последнего
if (thisRequest !== lastRequest) return
@ensisf
ensisf / responsive svg polygon
Created September 19, 2016 11:24 — forked from djanix/responsive svg polygon
html - responsive svg polygon
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 1000 20" preserveAspectRatio="none" width="100%" height="20">
<polygon points="0,0 1000,0 500,20" style="fill:#cc3333; stroke: lightgrey; stroke-width: 6;"/>
</svg>