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
Copy file name to clipboardExpand all lines: content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,10 +66,10 @@ If you have existing source code or repositories stored locally on your computer
66
66
$ git init -b main
67
67
```
68
68
69
-
If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git branch -m`.
69
+
If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git symbolic-ref HEAD refs/heads/main`.
70
70
71
71
``` shell
72
-
$ git init && git branch -m main
72
+
$ git init && git symbolic-ref HEAD refs/heads/main
73
73
```
74
74
5. Add the files in your new local repository. This stages them for the first commit.
75
75
@@ -113,10 +113,10 @@ If you have existing source code or repositories stored locally on your computer
113
113
$ git init -b main
114
114
```
115
115
116
-
If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git branch -m`.
116
+
If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git symbolic-ref HEAD refs/heads/main`.
117
117
118
118
``` shell
119
-
$ git init && git branch -m main
119
+
$ git init && git symbolic-ref HEAD refs/heads/main
120
120
```
121
121
5. Add the files in your new local repository. This stages them for the first commit.
122
122
```shell
@@ -159,10 +159,10 @@ If you have existing source code or repositories stored locally on your computer
159
159
$ git init -b main
160
160
```
161
161
162
-
If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git branch -m`.
162
+
If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git symbolic-ref HEAD refs/heads/main`.
163
163
164
164
``` shell
165
-
$ git init && git branch -m main
165
+
$ git init && git symbolic-ref HEAD refs/heads/main
166
166
```
167
167
5. Add the files in your new local repository. This stages them for the first commit.
0 commit comments