More lazygit notes

This commit is contained in:
Olivier 'reivilibre' 2023-03-27 11:55:35 +01:00
parent a018367b49
commit 91a8ca1569

View File

@ -36,7 +36,7 @@ Use Up/Down to choose a file/directory.
Press space to stage/unstage a whole file/directory.
**Magic:** When on a file, you can see the diff on the right-hand-side. You can **click** on a line and press space to stage/unstage a single line(!!!).
**Magic:** When on a file, you can see the diff on the right-hand-side. You can **click** on a line (or hit `enter` on the file) and press space to stage/unstage a single line(!!!). *You can also press `v` to start a range and then press space to stage/unstage a range of lines.*
Press `c` to make a commit — you get a single-line text editor. If you want to use a full editor, use `C`.
@ -83,3 +83,5 @@ If you can't resolve, you can always press `m` then choose `abort` to stop whate
## Other tips
On a branch or commit: `g` brings up the 'reset' menu. I often use `g``soft` on a commit to un-commit things (this rolls back the branch to a previous point but keeps the changes as staged changes) so that I can tweak them however I like. When doing dirty work I will often make commits with rubbish names like 'STASH' and then later un-commit them and commit them thoughtfully.
[15 Lazygit Features In Under 15 Minutes](https://yewtu.be/watch?v=CPLdltN7wgE) is a video by the author of lazygit which I think I found useful.