Skip to content

JoinCODED/TASK-git-and-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

Git and Github

You are going to learn how to use git and Github by creating a new repo on GitHub and cloning it to your device. You will be able to push to it as well.

Instructions

0. Link your Github account to your machine using SSH

  • Follow the instructions from Github for how to generate and connect an SSH key
  • This key will allow you to communicate with github from your terminal without having to log in over and over again
  • Let your instructor or TA know when you’ve successfully tested your SSH connection.

1. Create a new git repository on Github.com

  • Login to your account on GitHub
  • Click on the green New button. (🎁 Gift: github.new is a shortcut website that allows you to quickly create a new repo)
  • Name it HelloGithub
  • Make sure you select public
  • Create the repo

2. Clone the Repo to your device

You own this repo because you created it! It's time to clone it!

  • Click on the green code button

  • Select SSH and copy the ssh link. Should look like this:

    ssh

  • Open the terminal app

  • Navigate to the folder you created that includes your development work

  • Clone the repo from the copied url

    $ git clone git@github.com:{YOUR_ACCOUNT_NAME}/HelloGithub.git

    ⚠️ If you get an error, check step 0 again

  • The repo should be cloned now on your device. Go to the cloned repo by writing the command

    $ cd HelloGithub

3. Edit your repo

  • Create a new text file in this directory with your name. (e.g. "zainab.txt")
  • add and commit the empty text file you just made.
  • Open the text file, write something about yourself, and save the file.
  • add and commit the text file again.
  • push your local changes to the remote repository.
  • Add an image of your favorite food in your local repository. (You can download any image for this from Google if you need to.)
  • add, commit, push your changes.

About

Learn how to use git and github and create a new repo from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5