Skip to content

Instantly share code, notes, and snippets.

View IEdiong's full-sized avatar
👨‍🍳
Cooking

Ediongsenyene Joseph IEdiong

👨‍🍳
Cooking
View GitHub Profile
@IEdiong
IEdiong / npx command to run angular cli
Created November 11, 2024 13:05 — forked from ddieppa/npx command to run angular cli
This is the npx command to run angular cli new project without install it globally
npx -p @angular/cli ng new hello-world-project
then locally can run
npx ng g c hello-world-component
@IEdiong
IEdiong / table-of-contents.md
Created September 17, 2024 05:20 — forked from isaacplmann/table-of-contents.md
Advanced Angular Patterns
@IEdiong
IEdiong / nodejs.errno.h
Created March 17, 2023 10:51 — forked from pbojinov/nodejs.errno.h
node.js errno descriptions. Useful for debugging.
/* Pulled from https://github.com/joyent/node/blob/master/deps/uv/include/uv.h */
/* Expand this list if necessary. */
#define UV_ERRNO_MAP(XX) \
XX(E2BIG, "argument list too long") \
XX(EACCES, "permission denied") \
XX(EADDRINUSE, "address already in use") \
XX(EADDRNOTAVAIL, "address not available") \
XX(EAFNOSUPPORT, "address family not supported") \
XX(EAGAIN, "resource temporarily unavailable") \
XX(EAI_ADDRFAMILY, "address family not supported") \
@IEdiong
IEdiong / revert-a-commit.md
Created August 26, 2022 06:13 — 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:

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons