8000 GitHub - ai-kadhim/practice_repo: Practice repo for CCC students
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ai-kadhim/practice_repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Quick Review

We will be using some terminal commands, so let's make sure you know what they are and what they do!

Command Stands For Description
ls long listing lists all files and directories in the present working directory
ls -a long listing all lists hidden files as well
cd {dirname} change directory to change to a particular directory
cd ~ change directory home navigate to HOME directory
cd .. change directory up move one level up
cat {filename} concatenate displays the file content
sudo superuser allows regular users to run programs with the security privileges of the superuser or root
mv {filename} {newfilename} move renames the file to new filename
clear clear clears the terminal screen
mkdir {dirname} make directory create new directory in present working directory or at specified path
rm {filename} remove remove file with given filename
touch {filename}.{ext} touch create new empty file
rmdir {dirname} remove directory deletes a directory
ssh {username}@{ip-address} or {hostname} secure shell login into a remote Linux machine using SSH

Setting up GitHub!

Generating a GitHub Access Token

Create an account with GitHub here if you do not have one.

Navigate to GitHub's Developer Token settings. Click on Generate new token > Generate new token (classic) Screenshot 2023-08-30 at 8 16 58 PM

Give the token a description, set the expiration (we recommend 90 days), and check every box. When you're done, click Generate token at the bottom of the page.

Screenshot 2023-08-30 at 8 36 14 PM

Copy the access token and save it for later use. We will use this token to interact with GitHub. Please do not lose this access token or you will need to generate a new one.

image

Github SSH Setup Secure Shell Protocol (SSH) provides a secure communication channel of an unsecured network. Let's set it up!

  1. Generate a Private/Public SSH Key Pair.
ssh-keygen -o -t rsa -C "your email address for github"
  1. Save file pair. Default location ~/.ssh/id_rsa is fine!

  2. At the prompt, type in a secure passphrase.

  3. Copy the contents of the public key that we will share with GitHub.

    • Mac: pbcopy < ~/.ssh/id_rsa.pub

    • Windows (WSL): clip.exe < ~/.ssh/id_rsa.pub

    • Linux: xclip -sel c < ~/.ssh/id_rsa.pub

  4. Go to your GitHub account and go to Settings.

  5. Under Access, click on the SSH and GPG keys tab on the left.

image

  1. Click on the New SSH Key button.

image

  1. Name the key, and paste the public key that you copied. Click the Add SSH Key button

image

Viewing the Repositories

Login and click on the top right user icon, then go to Your repositories.

image

Creating a New Repository

When viewing the respository page, click on New and proceed to create your repo.

image


Filling Respository Details

Create the repository by inputting the following:

  • Repo name
  • Repo description
  • Make repo public
  • Add a README
  • Add .gitignore (Python template)
  • Add license (choose MIT)

Then click Create Repository.

image

Clone Your Repo
  1. Open your terminal and navigate to a place where you would like to make a directory to hold all your files for this class using the command cd.
cd {directory name}
  1. Once there, make a top level directory using mkdir.
mkdir {directory name}
  1. cd into it and make another directory called code.
cd {directory name}
mkdir code
  1. cd into it and run your git clone {your repo url} command.
cd code
git clone {your repo url}

About

Practice repo for CCC students

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0