Skip to content

Commit

Permalink
Merge pull request github#30454 from github/meowius-locally-hosted-up…
Browse files Browse the repository at this point in the history
…load

Update Git init command for uploading locally hosted code to work with earlier versions
  • Loading branch information
meowius authored Sep 6, 2022
2 parents b84b627 + 3afbf9d commit 9e302ad
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ If you have existing source code or repositories stored locally on your computer
$ git init -b main
```

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`.
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`.

``` shell
$ git init && git branch -m main
$ git init && git symbolic-ref HEAD refs/heads/main
```
5. Add the files in your new local repository. This stages them for the first commit.

Expand Down Expand Up @@ -113,10 +113,10 @@ If you have existing source code or repositories stored locally on your computer
$ git init -b main
```

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`.
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`.

``` shell
$ git init && git branch -m main
$ git init && git symbolic-ref HEAD refs/heads/main
```
5. Add the files in your new local repository. This stages them for the first commit.
```shell
Expand Down Expand Up @@ -159,10 +159,10 @@ If you have existing source code or repositories stored locally on your computer
$ git init -b main
```

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`.
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`.

``` shell
$ git init && git branch -m main
$ git init && git symbolic-ref HEAD refs/heads/main
```
5. Add the files in your new local repository. This stages them for the first commit.
```shell
Expand Down

0 comments on commit 9e302ad

Please sign in to comment.