Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify README build instructions, Automate RC-file specification #4264

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ Normally the lazygit formula can be found in the Homebrew core but we suggest yo

Tap:

```
```sh
brew install jesseduffield/lazygit/lazygit
```

Core:

```
```sh
brew install lazygit
```

Expand Down Expand Up @@ -429,29 +429,35 @@ You can install `lazygit` using the `winget` command in the Windows Terminal wit
winget install -e --id=JesseDuffield.lazygit
```

### Manual
### Install Lazygit From Source

You'll need to [install Go](https://golang.org/doc/install)
First, [install Go](https://golang.org/doc/install)

```
```sh
git clone https://github.com/jesseduffield/lazygit.git
cd lazygit
go install
```

You can also use `go run main.go` to compile and run in one go (pun definitely intended)
### Compile Emphemeral Binary
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be four hashes cos it belongs to the above section


Alternatively use `go run main.go` to compile and run in one go (pun definitely intended)

## Usage

Call `lazygit` in your terminal inside a git repository.
Call `lazygit` in your terminal, while inside a git repository.

```sh
```shell
$ lazygit
```

If you want, you can
also add an alias for this with `echo "alias lg='lazygit'" >> ~/.zshrc` (or
whichever rc file you're using).
### Add ZSH/Bash Alias

Create a shortcut for lazygit by adding an alias to the shell configuration file.

```sh
echo "alias lg='lazygit'" >> "$HOME/.$(basename $SHELL)rc"
```

### Keybindings

Expand All @@ -461,7 +467,7 @@ You can check out the list of keybindings [here](/docs/keybindings).

If you change repos in lazygit and want your shell to change directory into that repo on exiting lazygit, add this to your `~/.zshrc` (or other rc file):

```
```sh
lg()
{
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
Expand Down