...
Code Block |
---|
|
$ mkdir myapp
$ cd myapp
$ git init
Initialized empty Git repository in ...
$ git status
On branch main
No commits yet
nothing to commit (create/copy files and use "git add" to track)
|
Add repo to GitHub
Create the repo in GitHub without adding any files (README, License, .gitignore). If you allow Github to add files, they will be added to the master branch.
Code Block |
---|
|
echo "# myapp" >> README.md
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/your_organization/myapp.git
git push -u origin main |
NOTE: All of this is listed on the new repo page in github when you create the repo. EXCEPT the last line which specifies main as the branch instead of the default master branch provided by github.