> For the complete documentation index, see [llms.txt](https://aaron-mota.gitbook.io/aarons-style-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aaron-mota.gitbook.io/aarons-style-guide/starting-a-new-project/setup/command-line-setup/aliasing-.zshrc.md).

# Aliasing (.zshrc)

<details>

<summary>Notes &#x26; Setup</summary>

#### For Zsh

1. **Edit `.zshrc`:**
   * Open your `.zshrc` file in your home directory with a text editor.
   * Command: `nano ~/.zshrc`
2. **Add the Alias:**
   * Add the following line at the end of the file:

     ```zsh
     zshCopy codealias ga='git add -A'
     ```
3. **Reload the Configuration:**
   * After saving the file, reload the configuration by running:

     ```zsh
     zshCopy codesource ~/.zshrc
     ```
   * Or close and reopen your terminal.

#### For Bash

1. **Edit `.bashrc` or `.bash_profile`:**
   * Open your `.bashrc` file in your home directory with a text editor. If you are on macOS, you might want to edit `.bash_profile` instead.
   * Command: `nano ~/.bashrc` (or `nano ~/.bash_profile` for macOS)
2. **Add the Alias:**
   * Add the following line at the end of the file:

     ```bash
     bashCopy codealias ga='git add -A'
     ```
3. **Reload the Configuration:**
   * After saving the file, reload the configuration by running:

     ```bash
     bashCopy codesource ~/.bashrc
     ```
   * Or simply close and reopen your terminal.

#### For Fish

1. **Use `alias` Command:**
   * In Fish, you can create an alias using the `alias` command and then save it.
   * Run:

     ```fish
     fishCopy codealias ga='git add -A'
     funcsave ga
     ```

#### Notes:

* These changes will only apply to your user on your current machine. If you use multiple machines or accounts, you'll need to repeat this process for each one.
* If you're not sure which shell you are using, you can usually find out by running `echo $SHELL` in your terminal.
* Remember that aliases are a great way to save time on frequently used commands, but they are local to your shell and won't be available in scripts or on other machines unless you define them there as well.

</details>

<details>

<summary>Aaron's Personal Preference</summary>

```
alias cl='clear'
alias d='npm run dev'
alias s='npm run start'
alias b='npm run build'

alias ga='git add -A'
alias gs='git status'
alias gp='git push'
alias gl='git pull'
alias gf='git fetch'
alias gc='git checkout'
alias gb='git branch'
alias gd='git diff'
alias gmg='git merge'
alias glg='git log'
alias gsta='git stash'
alias gstp='git stash pop'
alias grb='git rebase'
alias grbc='git rebase --continue'
alias grba='git rebase --abort'

alias ylf='yarn lint:format'

gm() {
    git commit -m "$*"
}
```

</details>
