Skip to content

Instantly share code, notes, and snippets.

@namzo
namzo / gem-install-error-fix.md
Last active Nov 21, 2020
Fix gem install error - MacOS Bug Sur
View gem-install-error-fix.md

If you get this error message:

ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.

Fix

sudo gem install [gem-name] -n /usr/local/bin



@namzo
namzo / update-npm
Created Nov 19, 2020
Update npm packages when update isn't working
View update-npm
npm i -g npm-check-updates
ncu -u
npm install
@namzo
namzo / git-workflow.md
Last active May 11, 2020
Git workflow
View git-workflow.md

1. Create new branch with changes in master

git checkout -b [feature branch name]

2. Add changes and Commit

git commit -a -m "Commit message"

3. Push changes to remote

git push origin [feature branch name]

--

@namzo
namzo / pull-from-master.md
Last active May 11, 2020
Pull changes from feature branch to master
View pull-from-master.md

1. Update your master branch:

git checkout master
git pull --rebase origin master

2. Merge changes from Master to feature branch

git checkout [feature branch name]
git merge --no-ff master

3. Check if your changes has been included (Optional)

git log