From 4960f45f6f7686d631e81faa14140f95baa0dddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Pe=C3=B1a?= Date: Wed, 28 Aug 2013 10:30:37 +0300 Subject: [PATCH 1/2] fixing typo in cheat git --- cheatsheets/git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheets/git b/cheatsheets/git index 545dfbe..82decb4 100644 --- a/cheatsheets/git +++ b/cheatsheets/git @@ -22,6 +22,6 @@ git remote add upstream git@github.com:name/repo.git # Set a new repo git remote -v # Confirm new remote repo git fetch upstream # Get branches git branch -va # List local - remote branches -git checkout master # Checpkout local master branch +git checkout master # Checkout local master branch git merge upstream/master # Merge remote into local repo From 53a2a616d0640c489a5a2c403f7accc19623a3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Pe=C3=B1a?= Date: Sat, 31 Aug 2013 12:46:33 +0300 Subject: [PATCH 2/2] chead sed to remove empty lines --- cheatsheets/sed | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cheatsheets/sed b/cheatsheets/sed index 53cf5ad..5d97e4a 100644 --- a/cheatsheets/sed +++ b/cheatsheets/sed @@ -9,3 +9,6 @@ echo 'It is daytime' | sed 's/day/night/g' # To remove leading spaces sed -i -r 's/^\s+//g' file.txt + +# To remove empty lines +cat file.txt | sed '/^$/d'