In VS Code terminal on Windows,
I am trying to display my commits by using git log
and somehow, the displayed result's indentation are broken.
AFAIK, I accidentally pressed arrow keys which move the screen of terminal in VS Code to the right.
I git add and commit them like this:
feature/POR-1-landing-page-ui
* Remove @webpack-cli/generators
* Sanitize spaces to tabs
But the indents appear like this when I git log
and there's large indent between the *
and #commit messages
.
$ git log
commit b153284 (HEAD -> feature/POR-1-landing-page-ui)
feature/POR-1-landing-page-ui
* Remove @webpack-cli/generators
* Sanitize spaces to tabs
This is how I want the indents to be displayed. When there are too many changes, it's difficult to read the commit messages because of the large indents.
commit 7a0dcb4
feature/POR-1-landing-page-ui
* Sanitize imports
* Sanitize indents
* Sanitize folder name
I tried to restart the integrated terminal first and still the same, afterwards tried restarting vscode nothing happens also. I checked VS Code settings but nothing was modified.
Just figure out a workaround for this
Using VS Code commit editor just replace the indents to spaces
Convert indents to spaces
from the settings before committing.
Because the terminal is interpretting indents as 4 spaces mentioned by @torek
git log adds four spaces in front of the commit log message data by default. Other than that it just sends it directly to the terminal or through a pager to the terminal; interpretation of spaces, tabs, escape sequences, and the like are up to the pager (if you're using one) and then the terminal.
commit 7a0dcb4
feature/POR-1-landing-page-ui
* Sanitize imports
* Sanitize indents
* Sanitize folder name
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.