From 558ba7f192c39d0f0359d1745590c348dc6d3377 Mon Sep 17 00:00:00 2001
From: Stelio Kontos <37424493+StelioKontosXBL@users.noreply.github.com>
Date: Tue, 16 Nov 2021 20:06:09 -0800
Subject: [PATCH 1/2] Fix windows tip appearing in code block
---
...g-a-subfolder-out-into-a-new-repository.md | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md b/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md
index 486fc035de..d493b788ba 100644
--- a/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md
+++ b/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md
@@ -27,24 +27,24 @@ If you create a new clone of the repository, you won't lose any of your Git hist
$ cd REPOSITORY-NAME
```
5. To filter out the subfolder from the rest of the files in the repository, run [`git filter-repo`](https://github.com/newren/git-filter-repo), supplying this information:
- - `FOLDER-NAME`: The folder within your project where you'd like to create a separate repository.
+ - `FOLDER-NAME`: The folder within your project where you'd like to create a separate repository.
- {% windows %}
+ {% windows %}
- {% tip %}
+ {% tip %}
- **Tip:** Windows users should use `/` to delimit folders.
+ **Tip:** Windows users should use `/` to delimit folders.
- {% endtip %}
+ {% endtip %}
- {% endwindows %}
+ {% endwindows %}
- ```shell
- $ git filter-repo --path FOLDER-NAME1/ --path FOLDER-NAME2/
- # Filter the specified branch in your directory and remove empty commits
- > Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (89/89)
- > Ref 'refs/heads/BRANCH-NAME' was rewritten
- ```
+ ```shell
+ $ git filter-repo --path FOLDER-NAME1/ --path FOLDER-NAME2/
+ # Filter the specified branch in your directory and remove empty commits
+ > Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (89/89)
+ > Ref 'refs/heads/BRANCH-NAME' was rewritten
+ ```
The repository should now only contain the files that were in your subfolder(s).
6. [Create a new repository](/articles/creating-a-new-repository/) on {% data variables.product.product_name %}.
From 4c85fb5e9ce1b6d1826a14c293328e42f50fec07 Mon Sep 17 00:00:00 2001
From: Stelio Kontos <37424493+StelioKontosXBL@users.noreply.github.com>
Date: Tue, 16 Nov 2021 21:38:47 -0800
Subject: [PATCH 2/2] Corrected remaining indentation and spacing
After reviewing a few other doc pages, adjusted indentation accordingly and spaced the numbered list items for consistency.
---
...g-a-subfolder-out-into-a-new-repository.md | 77 +++++++++++--------
1 file changed, 43 insertions(+), 34 deletions(-)
diff --git a/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md b/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md
index d493b788ba..f070c323c5 100644
--- a/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md
+++ b/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md
@@ -17,27 +17,31 @@ shortTitle: Splitting a subfolder
If you create a new clone of the repository, you won't lose any of your Git history or changes when you split a folder into a separate repository.
{% data reusables.command_line.open_the_multi_os_terminal %}
+
2. Change the current working directory to the location where you want to create your new repository.
-3. Clone the repository that contains the subfolder.
- ```shell
- $ git clone https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME
- ```
+
+4. Clone the repository that contains the subfolder.
+ ```shell
+ $ git clone https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME
+ ```
+
4. Change the current working directory to your cloned repository.
- ```shell
- $ cd REPOSITORY-NAME
- ```
+ ```shell
+ $ cd REPOSITORY-NAME
+ ```
+
5. To filter out the subfolder from the rest of the files in the repository, run [`git filter-repo`](https://github.com/newren/git-filter-repo), supplying this information:
- `FOLDER-NAME`: The folder within your project where you'd like to create a separate repository.
- {% windows %}
+ {% windows %}
- {% tip %}
+ {% tip %}
- **Tip:** Windows users should use `/` to delimit folders.
+ **Tip:** Windows users should use `/` to delimit folders.
- {% endtip %}
+ {% endtip %}
- {% endwindows %}
+ {% endwindows %}
```shell
$ git filter-repo --path FOLDER-NAME1/ --path FOLDER-NAME2/
@@ -45,37 +49,42 @@ If you create a new clone of the repository, you won't lose any of your Git hist
> Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (89/89)
> Ref 'refs/heads/BRANCH-NAME' was rewritten
```
- The repository should now only contain the files that were in your subfolder(s).
+
+ The repository should now only contain the files that were in your subfolder(s).
6. [Create a new repository](/articles/creating-a-new-repository/) on {% data variables.product.product_name %}.
+
7. At the top of your new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}'s Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL.
- 
+
+ 
- {% tip %}
+ {% tip %}
- **Tip:** For information on the difference between HTTPS and SSH URLs, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)."
+ **Tip:** For information on the difference between HTTPS and SSH URLs, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)."
- {% endtip %}
+ {% endtip %}
8. Check the existing remote name for your repository. For example, `origin` or `upstream` are two common choices.
- ```shell
- $ git remote -v
- > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME.git (fetch)
- > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME.git (push)
- ```
+ ```shell
+ $ git remote -v
+ > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME.git (fetch)
+ > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME.git (push)
+ ```
9. Set up a new remote URL for your new repository using the existing remote name and the remote repository URL you copied in step 7.
- ```shell
- git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git
- ```
+ ```shell
+ git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git
+ ```
+
10. Verify that the remote URL has changed with your new repository name.
- ```shell
- $ git remote -v
- # Verify new remote URL
- > origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git (fetch)
- > origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git (push)
- ```
+ ```shell
+ $ git remote -v
+ # Verify new remote URL
+ > origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git (fetch)
+ > origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git (push)
+ ```
+
11. Push your changes to the new repository on {% data variables.product.product_name %}.
- ```shell
- git push -u origin BRANCH-NAME
- ```
+ ```shell
+ git push -u origin BRANCH-NAME
+ ```