Initialize a local directory as a Git repository and add it to Github Part 4 – Add a remote origin and push the changes in the local repository to GitHub

Head over to GitHub and copy the repository URL.

Now in the Git bash set the new remote and verify the new remote URL.

git remote add origin URL
git remote -v

Now finally push the changes in your local repository to the remote repository.

git push origin main

There you go! Now head over to Github and check our your new file!

Good job! Now go and create some new files!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: