Skip to content

JDAS1234/GitHub-Workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

GitHub-Workshop

This is a README file. It is automatically displayed on the main page of a repo on GitHub. READMEs are typically used to introduce a project.

1. Make a GitHub Account

Go to https://www.github.com/ and follow the instructions to make an account, if you do not already have one.

2. Download GitHub Desktop

Go to https://desktop.github.com/download/ and download the version of GitHub Desktop for your device.

3. Create a *fork* of this repo.

  1. Click "Fork" by the top right of the GitHub repo web page.
  2. Click the green "Create Fork" button.

4. *Clone* your fork of this repo.

  1. Open GitHub Desktop and sign in.
  2. At the top of your screen, go to File > Clone Repository.
  3. Select your fork of this repo.
  4. Click the blue "Clone" button.
  5. Select "For my own purposes".
  6. Click the blue "Continue" button.

5. Make a *branch* off your fork.

  1. In GitHub Desktop, navigate to the top of screen and click "Current Branch: main".
  2. Click "New Branch".
  3. Give the branch a name.
  4. Click the blue "Create Branch" button.
  5. Click the blue "Switch Branch" button.

6. *Add and commit* a change.

  1. At the top of your screen, go to Repository > Open in Visual Studio Code. Yours may differ if you do not have Visual Studio Code.
  2. In VS Code, open the README.md file.
  3. Write something in the space indicated below.
  4. Save your changes.
  5. Open GitHub Desktop.
  6. You will see changes in the left menu.
  7. Click the checkmark beside README.md to add it to the staging area.
  8. Write a commit message in the bottom left.
  9. Click the blue "Commit 1 file to YOUR_BRANCH_NAME" button.

WRITE SOMETHING HERE -> here 2323

7. *Push* your changes from local to remote.

  1. In Github Desktop, go to the top of the window and click "Publish Branch".

8. Accept the *pull request*.

  1. In the GitHub remote repo web page, click Pull Requests at the top of the page.
  2. Click the green "New" button.
  3. Click "base repository" and select your fork the workshop repo.
  4. Click "compare" and select the branch you made previously.
  5. Click the green "Create pull request" button.
  6. Write a description of your pull request and click the green "Create pull request" button.

9. *Merge* your pull request.

  1. Click the green "Merge pull request" button.
  2. Click the green "Confirm merge" button.

10. One more time!

  1. In GitHub Desktop, navigate to the top of screen and click "Current Branch: YOUR_BRANCH_NAME".
  2. Click "New Branch".
  3. Give the branch another name.
  4. Click the blue "Create Branch" button.
  5. Click the blue "Switch Branch" button.
  6. At the top of your screen, go to Repository > Open in Visual Studio Code. Yours may differ if you do not have Visual Studio Code.
  7. Create a new file in VS Code by right clicking in the left menu and selecting "New file.
  8. Name this file with the suffix .txt.
  9. Go to GitHub Desktop.
  10. Click the checkmark beside your file to add it to the staging area.
  11. Write a commit message in the bottom left.
  12. Click the blue "Commit 1 file to YOUR_BRANCH_NAME_2" button.

11. Merge in GitHub Desktop.

  1. In GitHub Desktop, navigate to the top of screen and click "Current Branch: YOUR_BRANCH_NAME_2".
  2. Select the main branch.
  3. Click the blue "Switch Branch" button.
  4. Navigate to the top of screen and click "Current Branch: main".
  5. At the bottom of the popup menu, click "Choose a branch to merge in to main".
  6. Select the second branch we made.
  7. Click the blue "Create a merge commit" button.

12. *Pull* changes from the remote repo.

  1. Open the remote reposistory web page.
  2. Click the pencil icon to edit the README.
  3. Check this checkbox by putting an x between the brackets: [ ]
  4. Press the green "Commit changes..." button.
  5. Open GitHub Desktop and click "Pull origin" at the top of the screen.

13. Go to an old version.

  1. In GitHub Desktop, click "History" in the left menu.
  2. Right click on the commit where you forked this workshop repo.
  3. Select "Checkout commit".
  4. Click the grey "Checkout" button.
  5. Now that we are on an old commit, let's make a new branch off of this old commit.
  6. Open your working directory in VS code and make a DIFFERENT change to the part where we had you write something.
  7. Add the change and commit it.
  8. Push the changes by clicking "Publish Branch".
  9. Open the remote repo web page, and make a pull request into your fork.
  10. You will not be able to automatically merge (*merge conflict*), but create the pull request anyway.
  11. Click the grey "Resolve conflicts" button.
  12. Click either "Accept currrent change" or "Accept incoming change".
  13. Click "Mark as resolved" by the top right.
  14. Click the green "Commit merge" button in the top right.
  15. We can now click the green "Merge pull request" button and "Confirm merge".

14. YOU HAVE COMPLETED THIS WORKSHOP!!!

You are now a GitHub GOAT, but there's still more to learn...

15. Additional Resources

  1. GitHub First Contributions => Learn how to start contributing to all of the amazing open-source projects available on GitHub!
  2. Git Cheat Sheet => Save this for whenever you need a quick reminder!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published