Browse to https://github.com and sign in.
Click the green “New” button near the top of the left sidebar to begin creating a new GitHub repo. A “Create a new repository” form will appear.
For the Repository name field, enter “github-activity-app”.
Select the Private option.
Click the green “Create repository” button at the bottom of the form.
You have now created an empty GitHub repository. The home page for the repository should be displayed, although it doesn’t currently show any code.
Note the section …or push an existing repository from the command line. It should contain a box with three git
commands. On the right side of the box is a copy button.
Press the copy button to copy the three git
commands.
In your terminal, cd
into the working tree of your local repo.
Switch to the main
branch if you’re not already on it:
git switch main
Paste the commands into your terminal and press enter.
You have now set the GitHub repo as a remote repo for your local repo, and you have uploaded your local version database to the remote.
Reload the GitHub repo page.
You will now see the code files from the main
branch of your repo.
Run the gloga
command to inspect your local repo.
Note that a remote branch origin/main
now appears next to the local branch main
.
Press Q to quit out of the gloga
screen.
⏴ Back | Next ⏵ |