Skip to content

Instantly share code, notes, and snippets.

View felixdenoix's full-sized avatar
💭
OUI ALLÔ ?

Felix felixdenoix

💭
OUI ALLÔ ?
View GitHub Profile
@felixdenoix
felixdenoix / renderless_vue_component.js
Created November 21, 2020 11:55
Renderless vue component ( compied from ycmjason-talks/2019-06-20-vue-js-london-meetup-11 )
export default {
props: {
rootRef: {
type: Function,
},
targetRef: {
type: Function,
},
},
mounted() {

Keybase proof

I hereby claim:

  • I am felixdenoix on github.
  • I am fdenoix (https://keybase.io/fdenoix) on keybase.
  • I have a public key ASAeqLVYY_c7QJ6XoiTfdyQLhhOGr3OYeNeXQRnL4LunCgo

To claim this, I am signing this object:

@felixdenoix
felixdenoix / revert-a-commit.md
Created August 20, 2018 08:45 — 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:

// by Dan Dascalescu
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function demo() {
console.log('Taking a break...');
await sleep(2000);
console.log('Two second later');