Use Github to create a new Github repo and sync the local git repo you created in part one twith this remote repo.
Have fun!
-
Sign into Github or create an account if you haven't done so already
-
Check the + icon to the left of your profile on the main page
-
Choose 'new repository'
-
Select yourself as the owner and give the repo the name 'hello-world'
-
Make it public. Ignore the other options.
-
Click 'Create Repository'
-
In the page you opened copy the repo url in the Quick Setup section. For me this looks like
https://github.com/AloofBuddha/hello-world.git -
Use
git remote ...to associate the url with your local git repo -
use
git push ...to push the branchmainto your new remote Github repo (origin) -
Make a new commit and push that as well.
-
Confirm the changes are reflected on the Github page representing your repo.
-
Create a new feature branch
devon your local repo and make some changes and commit them -
Push this branch to
origin -
Go to the associated Github page and click the alert to intitiate a Pull Request to pull the changes from
devintomain -
Now that you have merged the pull request, the
mainbranch on the origin (Github) has changes themainbranch on your local git repo (on your computer) does not. Checkout the main branch and rungit pullto get the most recent changes onmainfrom Githb.
- add a
README.mdfile locally and push it to remote. Github will display this file below the contents of the repo like a 'home page' explaining what the repo is for.