You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- main copy of this section is in picture-viewer-popup-webpage.md#Clone the MicrosoftEdge-Extensions repo > -->
56
-
You can use various tools to clone a GitHub repo. You can download a selected directory, or clone the entire repo. These instructions use GitHub Desktop to clone the repo and switch to a working branch.
55
+
<!-- section copied from
56
+
[Clone the MicrosoftEdge-Extensions repo](./picture-viewer-popup-webpage.md#clone-the-microsoftedge-extensions-repo) in _Sample: Picture viewer pop-up webpage_.
57
+
-->
58
+
59
+
You can use various tools to clone a GitHub repo. You can download a selected directory, or clone the entire repo.
60
+
61
+
Clone the **MicrosoftEdge-Extensions** repo to your local drive, and then switch to a working branch, as follows.
62
+
63
+
64
+
##### [git bash command prompt](#tab/gitbash)
65
+
66
+
1. In a command prompt, enter `git` to check whether git is installed.
67
+
68
+
1. If not done yet, [download git](https://git-scm.com/downloads) and install it.
69
+
70
+
1. If not done yet, start a command prompt where git is installed.
71
+
72
+
1. Change to the directory where you want to clone the **MicrosoftEdge-Extensions** repo to. For example:
73
+
74
+
```
75
+
cd C:/Users/localAccount/GitHub/
76
+
```
77
+
78
+
1. In Microsoft Edge, go to the [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions) repo.
79
+
80
+
1. Click the down-arrow on the right side of the green **Code** button, and then in the **Clone using the web URL** section, click the **Copy url to clipboard** button next to `https://github.com/microsoft/MicrosoftEdge-Extensions.git`.
81
+
82
+
1. In the command prompt window, enter the command:
The `/MicrosoftEdge-Extensions/` directory is added within the directory that you specified.
89
+
90
+
91
+
<!-- ------------------------------ -->
92
+
#### Create a working branch and switch to it
93
+
94
+
1. Check the list of directories:
57
95
58
-
To clone the `MicrosoftEdge-Extensions` repo to your local drive:
96
+
```
97
+
dir
98
+
```
99
+
100
+
The `/MicrosoftEdge-Extensions/` directory is listed.
101
+
102
+
1. Switch to the new directory:
103
+
104
+
```
105
+
cd MicrosoftEdge-Extensions
106
+
```
107
+
108
+
1. Create a working branch:
109
+
110
+
```
111
+
git branch test
112
+
```
113
+
114
+
1. Switch to the working branch:
115
+
116
+
```
117
+
git switch test
118
+
```
119
+
120
+
Returns: `Switched to branch 'test'`
121
+
122
+
You are now free to modify the code in your working branch, without altering the code that's in the "main" branch of the repo. Later you might want to switch back to the "main" branch, or create a different branch based off the "main" branch.
123
+
124
+
125
+
##### [GitHub Desktop](#tab/githubdesktop)
59
126
60
127
1. If not done already, install GitHub desktop: go to [https://github.com/apps/desktop](https://github.com/apps/desktop), and then click the **Download now** button.
61
128
62
-
1. Go to [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions).
129
+
1. Go to the [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions) repo.
63
130
64
131
1. Click the **Code** button, and then select **Open with GitHub Desktop**.
65
132
@@ -71,14 +138,15 @@ To clone the `MicrosoftEdge-Extensions` repo to your local drive:
71
138
72
139
Or, in GitHub Desktop, the **Clone a repository** dialog opens:
73
140
74
-

141
+

75
142
76
143
1. Specify the local drive path to place the cloned repo directory into; for example: `C:\Users\accountname\GitHub\`.
77
144
78
145
1. Click the **Clone** button.
79
146
80
147
81
-
**Create working branch:**
148
+
<!-- ------------------------------ -->
149
+
#### Create a working branch and switch to it
82
150
83
151
1. In GitHub Desktop, make sure that in the upper left of GitHub desktop, **Current repository** is **MicrosoftEdge-Extensions**.
84
152
@@ -88,17 +156,24 @@ To clone the `MicrosoftEdge-Extensions` repo to your local drive:
88
156
89
157
The **Create a branch** dialog opens.
90
158
91
-
1. In the **Name** text box, enter a branch name, such as **ext-sample-2**, and then click the **Create branch** button.
159
+
1. In the **Name** text box, enter a branch name, such as **test**, and then click the **Create branch** button.
92
160
93
-
In the upper middle and lower left of GitHub Desktop, the current branch is shown, such as **ext-sample-2**.
161
+
In the upper middle and lower left of GitHub Desktop, the current branch is shown, such as **test**.
94
162
95
163
You are now free to modify the code in your working branch, without altering the code that's in the "main" branch of the repo. Later you might want to switch back to the "main" branch, or create a different branch based off the "main" branch.
96
164
165
+
---
166
+
167
+
97
168
<!--
98
169
See also:
99
170
* [Step 2: Create a branch](https://docs.github.com/en/get-started/start-your-journey/hello-world#step-2-create-a-branch) in _Hello World_ in GitHub Docs.
100
171
-->
101
172
173
+
<!-- / end of section copied from
174
+
[Clone the MicrosoftEdge-Extensions repo](./picture-viewer-popup-webpage.md#clone-the-microsoftedge-extensions-repo) in _Sample: Picture viewer pop-up webpage_.
<!-- for all extensions samples, this is the main copy to propagate copy/paste/modify. put comments on lines that vary per-sample -->
31
-
You can use various tools to clone a GitHub repo. You can download a selected directory, or clone the entire repo. These instructions use GitHub Desktop to clone the repo and switch to a working branch.
30
+
<!-- main copy of section to copy to extensions sample articles -->
32
31
33
-
To clone the `MicrosoftEdge-Extensions` repo to your local drive:
32
+
You can use various tools to clone a GitHub repo. You can download a selected directory, or clone the entire repo.
33
+
34
+
Clone the **MicrosoftEdge-Extensions** repo to your local drive, and then switch to a working branch, as follows.
35
+
36
+
37
+
##### [git bash command prompt](#tab/gitbash)
38
+
39
+
1. In a command prompt, enter `git` to check whether git is installed.
40
+
41
+
1. If not done yet, [download git](https://git-scm.com/downloads) and install it.
42
+
43
+
1. If not done yet, start a command prompt where git is installed.
44
+
45
+
1. Change to the directory where you want to clone the **MicrosoftEdge-Extensions** repo to. For example:
46
+
47
+
```
48
+
cd C:/Users/localAccount/GitHub/
49
+
```
50
+
51
+
1. Check the current directory:
52
+
53
+
```
54
+
pwd
55
+
```
56
+
57
+
1. In Microsoft Edge, go to the [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions) repo.
58
+
59
+
1. Click the down-arrow on the right side of the green **Code** button, and then in the **Clone using the web URL** section, click the **Copy url to clipboard** button next to `https://github.com/microsoft/MicrosoftEdge-Extensions.git`.
60
+
61
+
1. In the command prompt window, enter the command:
The `/MicrosoftEdge-Extensions/` directory is added within the directory that you specified.
68
+
69
+
70
+
<!-- ------------------------------ -->
71
+
#### Create a working branch and switch to it
72
+
73
+
1. Check the list of directories:
74
+
75
+
```
76
+
pwd
77
+
```
78
+
79
+
The `/MicrosoftEdge-Extensions/` directory is listed.
80
+
81
+
1. Switch to the new directory:
82
+
83
+
```
84
+
cd MicrosoftEdge-Extensions
85
+
```
86
+
87
+
1. Create a working branch:
88
+
89
+
```
90
+
git branch test
91
+
```
92
+
93
+
1. Switch to the working branch:
94
+
95
+
```
96
+
git switch test
97
+
```
98
+
99
+
Returns: `Switched to branch 'test'`
100
+
101
+
You are now free to modify the code in your working branch, without altering the code that's in the "main" branch of the repo. Later you might want to switch back to the "main" branch, or create a different branch based off the "main" branch.
102
+
103
+
104
+
##### [GitHub Desktop](#tab/githubdesktop)
34
105
35
106
1. If not done already, install GitHub desktop: go to [https://github.com/apps/desktop](https://github.com/apps/desktop), and then click the **Download now** button.
36
107
37
-
1. Go to [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions).
108
+
1. Go to the [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions) repo.
38
109
39
110
1. Click the **Code** button, and then select **Open with GitHub Desktop**.
40
111
@@ -53,7 +124,8 @@ To clone the `MicrosoftEdge-Extensions` repo to your local drive:
53
124
1. Click the **Clone** button.
54
125
55
126
56
-
**Create working branch:**
127
+
<!-- ------------------------------ -->
128
+
#### Create a working branch and switch to it
57
129
58
130
1. In GitHub Desktop, make sure that in the upper left of GitHub desktop, **Current repository** is **MicrosoftEdge-Extensions**.
59
131
@@ -63,17 +135,22 @@ To clone the `MicrosoftEdge-Extensions` repo to your local drive:
63
135
64
136
The **Create a branch** dialog opens.
65
137
66
-
1. In the **Name** text box, enter a branch name, such as **ext-sample-1**, and then click the **Create branch** button.
138
+
1. In the **Name** text box, enter a branch name, such as **test**, and then click the **Create branch** button.
67
139
68
-
In the upper middle and lower left of GitHub Desktop, the current branch is shown, such as **ext-sample-1**.
140
+
In the upper middle and lower left of GitHub Desktop, the current branch is shown, such as **test**.
69
141
70
142
You are now free to modify the code in your working branch, without altering the code that's in the "main" branch of the repo. Later you might want to switch back to the "main" branch, or create a different branch based off the "main" branch.
71
143
144
+
---
145
+
146
+
72
147
<!--
73
148
See also:
74
149
* [Step 2: Create a branch](https://docs.github.com/en/get-started/start-your-journey/hello-world#step-2-create-a-branch) in _Hello World_ in GitHub Docs.
75
150
-->
76
151
152
+
<!-- / end of main copy of section to copy to extensions sample articles -->
0 commit comments