git – How to make vi redraw screen?

Question:

When I use

It will enter into a vi window to let me input comments for commit, the problem is the vi windows will show some dirty characters from former shell background. So I wonder how can I let vi to reload or redraw the screen to make the screen normal.

So far, I try reset terminal and Ctrl+L, it works, but I wonder is there best answer for such situation?

Answer:

If your terminal supports it, ctrl+L is a common shortcut for this.

Leave a Reply