Skip to content

Instantly share code, notes, and snippets.

@ColtHands
ColtHands / GitSnippets.md
Last active December 11, 2024 10:28
Git Snippets

Git Snippets

How to remove file that was added to .gitignore after it was commited.

git rm {file_name} --cached

How to add changes to previous not pushed commit.

git commit --amend --no-edit

@niorad
niorad / gofunction.hs
Created January 23, 2016 18:59
Haskell Go-Function Example
divideBy x y = go x y 0
where go a b count
| a < b = (count, a)
| otherwise = go (a - b) b (count + 1)