3 ms·
Have a look at `tig`. It's even included in Git for Windows now and does this reasonably well. Only the keybindings are a bit weird if you're not accustomed to
by btschaegg 5y ago
Have a look at `tig`. It's even included in Git for Windows now and does this reasonably well.
Only the keybindings are a bit weird if you're not accustomed to Vim bindings:
- Open tig
- Change into the staging view with `s`
- Select your file using the arrow or `j` and `k` keys
- Press Return to show the diff
- Navigate to the line(s) in question with `j` and `k` (arrow keys will switch files)
- Stage parts with `1` (single line), `2` (chunk parts), `u` (chunks) or split chunks with `\`
- "Leave" the diff with `q`
- You can find the keybindings with `h` in the help screen, which also uses Vim keys -- like manpages usually do
- mariusor 5y ago"s" is status view, which you can also get at by running "tig status" directly. "c" is staging view. > - Stage parts with `1` (single line), `2` (chunk parts), `u` (chunks) or split chunks with `\` You can also revert a chunk or file by using "!". Sometimes this is very useful.
- btschaegg 5y agoAh, thanks for the correction :)
- mikewhy 5y agoI used tig for a bit because it was the nicest way I could find to do line-level staging in a terminal. But was really impressed with gitui https://github.com/extrawurst/gitui https://github.com/extrawurst/gitui so I've switched to that