Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

github-demo

A tiny shopping list for practising Git and GitHub: forking, cloning, pushing, and pulling.

Practice exercise

1. Fork and clone

  1. Click Fork at the top of this page to make your own copy.

  2. Clone your fork (use the HTTPS URL instead if you don't have an SSH key set up):

    git clone git@github.com:<your-username>/github-demo.git
    cd github-demo

2. Push a change

  1. Make a branch:

    git checkout -b add-<your-username>
  2. Open shopping-list.md and add one item to the end of the list.

  3. Commit and push to your fork:

    git add shopping-list.md
    git commit -m "Add <item> to shopping list"
    git push -u origin add-<your-username>
  4. On GitHub, click Compare & pull request to send your change to the original repo.

3. Pull everyone else's changes

  1. Connect to the original repo (only needed once):

    git remote add upstream git@github.com:churslic/github-demo.git
  2. After the pull requests are merged, get the latest list:

    git checkout main
    git pull upstream main
  3. Update your fork on GitHub:

    git push origin main

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors