Tag: Mac

How to Use zsh Alias

It’s very convenient to use an alias instead of full command. So, let’s see how we can make some aliases for git command –

To make an alias, open the terminal and write the command below –

vi ~/.zshrc

Write some aliases –

alias gs=”git status”
alias ga=”git add”
alias gm=”git commit -m”
alias bci=”brew cask install”

Colse and save the vim with clicking esc button and :wq

To make your created aliases work, run the command below –

source ~/.zshrc

Done. Now you can use the aliases you made as many times as you want.

Happy coding!

How to Delete Hidden Files on Mac

Go to the directory –

find . -name '*.DS_Store' -type f -delete

or,

sudo find / -name .DS_Store -delete;

To remove .git file –

rm -rf .git