From 477cb8fda2eb710333e97bde1e7ed699961583b6 Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Fri, 25 Mar 2022 12:49:09 -0400 Subject: [PATCH] .gitattributes: mark '*.md' as Markdown files Denote Markdown files as such with the 'diff' Git attribute [1]. This allows various Git commands (diff [2, 3], grep [4, 5], log [6], blame [7]) to show in which part of the "code" the changes are located in the hunk header, i.e. the previous commit would be shown as diff --git a/docs/remote/troubleshooting.md b/docs/remote/troubleshooting.md index bfcf303b7..5ab4f6e60 100644 --- a/docs/remote/troubleshooting.md +++ b/docs/remote/troubleshooting.md @@ -516,8 +516,9 @@ ### Cleaning up the VS Code Server on the remote If you want to run these steps manually, or if the command isn't working for you, you can run a script like this: ```bash -kill -9 `ps ax | grep "remoteExtensionHostAgent.js" | grep -v grep | awk '{print $1}'` -kill -9 `ps ax | grep "watcherService" | grep -v grep | awk '{print $1}'` +# Kill server processes +kill -9 `ps aux | \grep vscode-server | \grep USER | \grep -v grep | awk '{print $2}'` +# Delete related files and folder rm -rf ~/.vscode-server # Or ~/.vscode-server-insiders ``` Notice how the hunk header indicates the changes are in the "Cleaning up the VS Code Server on the remote" section. The history of that specific entry can now be interrogated using git log -L:"Cleaning up":docs/remote/troubleshooting.md [1] https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header [2] https://git-scm.com/docs/git-diff#_generating_patch_text_with_p [3] https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--W [4] https://git-scm.com/docs/git-grep#Documentation/git-grep.txt--p [5] https://git-scm.com/docs/git-grep#Documentation/git-grep.txt--W [6] https://git-scm.com/docs/git-log#Documentation/git-log.txt--Lltfuncnamegtltfilegt [7] https://git-scm.com/docs/git-blame#Documentation/git-blame.txt--Lltfuncnamegt --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 77c3fa3a3..f5b3634cd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,4 @@ *.mp4 filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text +*.md diff=markdown