Skip to content

Instantly share code, notes, and snippets.

View jovertical's full-sized avatar
🦉
Working from home

Jovert Lota Palonpon jovertical

🦉
Working from home
View GitHub Profile
@jovertical
jovertical / Errors.js
Created February 9, 2021 11:29 — forked from jeffochoa/Errors.js
Vue Form and Error validator (Laracasts)
class Errors {
/**
* Create a new Errors instance.
*/
constructor() {
this.errors = {};
}
/**
  1. Install Inertia:
# Server side adapter
composer require inertiajs/inertia-laravel

# Install Vue.js && client side adapter for Vue.js
npm install vue @inertiajs/inertia @inertiajs/inertia-vue
@jovertical
jovertical / revert-a-commit.md
Created January 12, 2020 14:22 — 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: