From 048cf0a3878d61ebe30d1aa87ab4606b903d0815 Mon Sep 17 00:00:00 2001 From: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Date: Sat, 9 Sep 2023 01:59:07 -0700 Subject: [PATCH] Added git settings for branch name suggestion, protection, pull, and mergeEditor (#21954) VS Code repository, specifically in the .vscode/settings.json, has some nice git features such as: Issue: #21955 "git.branchRandomName.enable" (for suggesting random branch name when creating a new branch, comes in very handy when person wants to make and try quick changes in Codespaces), "git.branchProtection" (for branch protection), "git.pullBeforeCheckout": (for pulling before checking out a branch), "git.mergeEditor": (for making easier when in times of resolving merge conflicts) which I found could be useful to the Python extension repository as well. Credits to @karrtikr for suggesting random name, and branch protection. --- .vscode/settings.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 174a850c901ef..06011b3d13cdc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -65,5 +65,14 @@ "--max-line-length=88" ], "typescript.preferences.importModuleSpecifier": "relative", - "debug.javascript.usePreview": false + "debug.javascript.usePreview": false, + // Branch name suggestion. + "git.branchRandomName.enable": true, + "git.branchProtection": [ + "main", + "release/*" + ], + "git.pullBeforeCheckout": true, + // Open merge editor for resolving conflicts. + "git.mergeEditor": true, }