Skip to content

GitHub Basics Workshop - Exercise #1 - Your 1st Repo & Commit #9

Open
@CristinaRuth

Description

Basic Commits to Remote Repo

This exercise is a part of our Github source control and basics workshop. If you're completely new to Github and git, we highly recommend you read through the workshop contents if you want to learn both.

This exercise is to help you get familiar with creating a repo, making commits, and understanding the process around that.

There is no pull request needed for this exercise!

For terminologies, please refer to the source-control-basics.md workshop contents.

What You'll Need

Steps

  1. Go to Github.com, login to your account and create a new repository - https://github.com/new. Check the “Initialize this repository with a README” box.
  2. Go to your new repository, click the “Clone or download” button, and copy the URL.
  3. Open a command prompt (or Terminal on Mac) and go to your Github folder. If it doesn’t exist, a typical path on Windows is c:\Users\yourid\Github - create it.
  4. Once there, clone your newly created repo.
    git clone url_you_copied
  5. Open Visual Studio and open the folder your of your repo.
  6. Open readme.md and make any changes you desire.
  7. Check all changes you made. Within Visual Studio’s Terminal window, ensure you’re on your repo’s folder.
    git status
  8. Stage your change.
    git add README.md
  9. Commit your change with a descriptive message.
    git commit -m “message”
  10. Push it to remote repo. If you get prompted for credentials, input your Github credentials.
    git push
  11. Load your repository on github.com in your browser and you should see “2 commits” there now. Click on that, and you will see your latest commit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    workshop exerciseAn issue that contains steps as part of a workshop exercise.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions