Basic Git Configuration
Set up your global Git configuration:
|
|
SSH Key Setup for GitHub
-
Generate a new SSH key (recommended to use Ed25519 algorithm):
1ssh-keygen -t ed25519 -C "your_email@example.com" -
Add your public key to GitHub:
-
Copy the public key to clipboard:
1xclip < ~/.ssh/id_ed25519.pub -
Or display it in terminal:
1cat ~/.ssh/id_ed25519.pub -
Paste it in GitHub Settings → SSH and GPG keys → New SSH key
-
-
Test your SSH connection:
1ssh -T git@github.com
SSH Agent Setup
To avoid repeatedly entering your SSH passphrase:
|
|
Lazygit - Terminal UI for Git
Lazygit is a simple terminal UI for Git commands that makes version control more visual and interactive.
Installation
Linux (Debian/Ubuntu)
For Debian 13 (Trixie) or Ubuntu 25.10:
|
|
For Debian 12 or Ubuntu 25.04:
|
|

Basic Lazygit Commands
| Key | Action |
|---|---|
x |
Show menu of actions |
P |
Push changes |
p |
Pull changes |
c |
Commit changes |
s |
Stage/unstage files |
b |
View branches |
m |
Merge branches |
d |
View diff |
? |
Show keybindings help |
Why Use Lazygit?
- Visual branch management
- Easy staging/unstaging of changes
- Built-in diff viewer
- Interactive rebase capabilities
- Reduced need to remember Git commands
- Works entirely in terminal (great for remote servers)
Custom Configuration
Create a config file at ~/.config/lazygit/config.yml to customize keybindings and appearance.
Common Git Workflow with Lazygit
-
Open lazygit in your repo:
1lazygit -
Stage changes with
s -
Commit with
c -
Push with
P -
Create/switch branches with
b -
Merge with
m