Re:Ask HN: What is your Git commit/push flow?
by mariusor on Thursday March 17, 2022 @12:50PM
(#30713227)
"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.
Re:Ask HN: What is your Git commit/push flow?
by btschaegg on Thursday March 17, 2022 @12:51PM
(#30713251)
Ah, thanks for the correction :)
Re:Ask HN: What is your Git commit/push flow?
by mikewhy on Thursday March 17, 2022 @01:13PM
(#30713481)
I 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 so I've switched to that
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