Staging Git Commits within Vim: Part 2 | Vim 🔥 Tips and Tricks

preview_player
Показать описание
In this video I follow up on several comments left on the initial Staging Git Commits with Vim video (linked below). We look at how `:Ge:` works, staging changes with a side-by-side diff view, and pushing all outstanding commits t the remote.

Links

#git #vim
Рекомендации по теме
Комментарии
Автор

Very good tips!. Greetings from Brazil

rafaelcadena
Автор

Why not expand inline diff with = and then stage with s? I only do it this way, it always works to select and stage just what I want . You can also discard changes with X or unstage with u etc, it works in visual mode too.

I also prefer to commit with verbose flag (for buffer autocompletion) so I have

[commit]
verbose = true

in my .gitconfig so I can just press cc to start committing.

Also, nice video. It's great that you're making videos about fugitive, it's one of my favorite tools.

phelipetelesdasilva
Автор

Thanks for sharing! In 4:58 how do you exit the editing window? I can see you type a P mirrored which I don't know what key is it, and then <C-O>?

eulersson
Автор

:Gwrite from the staged buffer writes staged to working copy (same as git checkout) – it is destructive operation so it requires ! to bypass the warning you had.

To stage you changes you need just to :write your staged buffer

odnoletkov
join shbcf.ru