1
0
mirror of synced 2025-12-20 18:36:31 -05:00

Fix for blank lines around code fences (#38255)

This commit is contained in:
Grace Park
2023-06-26 10:21:48 -07:00
committed by GitHub
parent a4913b5935
commit a8a6e4554a
272 changed files with 1552 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ shortTitle: Associate text editors
1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "code --wait"
```
@@ -35,6 +36,7 @@ shortTitle: Associate text editors
1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "code --wait"
```
@@ -46,6 +48,7 @@ shortTitle: Associate text editors
1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "code --wait"
```
@@ -59,6 +62,7 @@ shortTitle: Associate text editors
1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "subl -n -w"
```
@@ -70,6 +74,7 @@ shortTitle: Associate text editors
1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "'C:/Program Files (x86)/sublime text 3/subl.exe' -w"
```
@@ -81,6 +86,7 @@ shortTitle: Associate text editors
1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "subl -n -w"
```
@@ -95,6 +101,7 @@ shortTitle: Associate text editors
1. Install TextMate's `mate` shell utility. For more information, see "[`mate` and `rmate`](https://macromates.com/blog/2011/mate-and-rmate/)" in the TextMate documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "mate -w"
```
@@ -108,6 +115,7 @@ shortTitle: Associate text editors
1. Install Notepad++ from https://notepad-plus-plus.org/. For more information, see "[Getting started](https://npp-user-manual.org/docs/getting-started/)" in the Notepad++ documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Type this command:
```shell
git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
```

View File

@@ -40,15 +40,18 @@ For more information about authenticating with {% data variables.product.prodnam
{% mac %}
1. Install Git using [Homebrew](https://brew.sh/):
```shell
brew install git
```
2. Install GCM using Homebrew:
```shell
brew tap microsoft/git
brew install --cask git-credential-manager-core
```
For MacOS, you don't need to run `git config` because GCM automatically configures Git for you.
{% data reusables.gcm-core.next-time-you-clone %}

View File

@@ -116,17 +116,20 @@ To ensure that all the line endings in your repository match your new configurat
git add . -u
git commit -m "Saving files before refreshing line endings"
```
1. To update all files on the current branch to reflect the new configuration, run the following commands.
```shell copy
git rm -rf --cached .
git reset --hard HEAD
```
1. To display the rewritten, normalized files, run the following command.
```shell copy
git status
```
1. Optionally, to commit any outstanding changes in your repository, run the following command.
```shell copy

View File

@@ -23,7 +23,9 @@ GitHub maintains an official list of recommended _.gitignore_ files for many pop
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Navigate to the location of your Git repository.
3. Create a _.gitignore_ file for your repository.
```shell
touch .gitignore
```
@@ -43,7 +45,9 @@ git rm --cached FILENAME
You can also create a global _.gitignore_ file to define a list of rules for ignoring files in every Git repository on your computer. For example, you might create the file at _~/.gitignore_global_ and add some rules to it.
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Configure Git to use the exclude file _~/.gitignore_global_ for all Git repositories.
```shell
git config --global core.excludesfile ~/.gitignore_global
```

View File

@@ -76,10 +76,13 @@ The `git remote set-url` command takes two arguments:
- An existing remote name. For example, `origin` or `upstream` are two common choices.
- A new URL for the remote. For example:
- If you're updating to use HTTPS, your URL might look like:
```shell
https://{% data variables.command_line.backticks %}/OWNER/REPOSITORY.git
```
- If you're updating to use SSH, your URL might look like:
```shell
git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git
```
@@ -89,16 +92,21 @@ The `git remote set-url` command takes two arguments:
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Change the current working directory to your local project.
3. List your existing remotes in order to get the name of the remote you want to change.
```shell
$ git remote -v
> origin git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git (fetch)
> origin git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git (push)
```
4. Change your remote's URL from SSH to HTTPS with the `git remote set-url` command.
```shell
git remote set-url origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git
```
5. Verify that the remote URL has changed.
```shell
$ git remote -v
# Verify new remote URL
@@ -115,16 +123,21 @@ You can [use a credential helper](/get-started/getting-started-with-git/caching-
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Change the current working directory to your local project.
3. List your existing remotes in order to get the name of the remote you want to change.
```shell
$ git remote -v
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
```
4. Change your remote's URL from HTTPS to SSH with the `git remote set-url` command.
```shell
git remote set-url origin git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git
```
5. Verify that the remote URL has changed.
```shell
$ git remote -v
# Verify new remote URL

View File

@@ -23,11 +23,13 @@ Changing the name associated with your Git commits using `git config` will only
{% data reusables.command_line.open_the_multi_os_terminal %}
2. {% data reusables.user-settings.set_your_git_username %}
```shell
git config --global user.name "Mona Lisa"
```
3. {% data reusables.user-settings.confirm_git_username_correct %}
```shell
$ git config --global user.name
> Mona Lisa
@@ -40,11 +42,13 @@ Changing the name associated with your Git commits using `git config` will only
2. Change the current working directory to the local repository where you want to configure the name that is associated with your Git commits.
3. {% data reusables.user-settings.set_your_git_username %}
```shell
git config user.name "Mona Lisa"
```
3. {% data reusables.user-settings.confirm_git_username_correct %}
```shell
$ git config user.name
> Mona Lisa