Lazygit – Git Repository Management from the Terminal

Lazygit is a simple terminal tool for managing Git repositories. It provides an interactive interface for checking files, branches, commits, and stashes. You can use it to perform common Git tasks without typing many commands. Lazygit makes it easier to manage Git projects from the terminal with a simple interactive interface.

Here’s what you can do with Lazygit in Termux:

  • View Git repository changes.
  • Manage Git branches.
  • Check commit history.
  • Manage Git stashes.
  • Open a specific Git repository.
  • Filter Git history by a file or path.
  • View Lazygit logs.
  • Use debug mode.
  • Create custom configuration files.
  • Change the screen mode.
  • Generate shell completion scripts.

Install Lazygit in Termux

Lazygit can be installed directly from the Termux package manager with a single command.

Install Lazygit.

pkg install lazygit

Lazygit is now installed and ready to use.

Use Lazygit in Termux

After installing Lazygit, move to any cloned Git repository using cd directory-name and then run Lazygit. You can also use different commands and options to open specific panels and manage your Git repository.

Start Lazygit.

lazygit

Open Lazygit with the status panel focused.

lazygit status

Open Lazygit with the branch panel focused.

lazygit branch

Open Lazygit with the log panel focused.

lazygit log

Open Lazygit with the stash panel focused.

lazygit stash

Open a specific Git repository.

lazygit --path /path/to/repository

Filter Git history by a file or path.

lazygit --filter path/to/file

Show the help menu.

lazygit --help

Display the installed version.

lazygit --version

Run Lazygit in debug mode.

lazygit --debug

View Lazygit logs.

lazygit --logs

Print the default configuration.

lazygit --config

Show the configuration directory.

lazygit --print-config-dir

Use a custom configuration directory.

lazygit --use-config-dir /path/to/config

Use a custom configuration file.

lazygit --use-config-file /path/to/config.yml

Set the Git working tree.

lazygit --work-tree /path/to/repository

Set the Git directory.

lazygit --git-dir /path/to/repository/.git

Set the initial screen mode.

lazygit --screen-mode full

Available screen modes are normal, half, and full.

Generate a Bash completion script.

lazygit completion bash

Generate a Zsh completion script.

lazygit completion zsh

Start the profiler on HTTP port 6060.

lazygit --profile

You can also combine different options to open a specific repository and use a selected screen mode. For example:

lazygit --path ~/myproject --screen-mode full

End Note

Lazygit is a simple tool for managing Git repositories from the terminal. You can use its interactive interface to check changes, branches, commits, and other Git information without using many separate Git commands.

SHARE THIS POST: