Skip to content

ZhrChaos/git-lecture

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Git Lecture

Installing Git

To check if git is installed run git --version. If it is not installed do one of the following based on OS.

install node

brew install node

Ensure Every one has a github account

Windows / Mac Download

Windows will need Git Bash as well to get a unix terminal. have them download the client from this site.

https://git-scm.com/downloads

Terminal Commands

Students will need to know and get comfortable with the following commands and understand this is just another way of navigating their file structure.

  • tab: your best friend auto complete.

  • pwd: print working directory, see the full path of the directory (aka: folder).

  • ls: list, show all the items in the current directory.

  • cd: change directory, allows you to move between folders.

  • .: here, single dot means from the current directory.

  • cd ..: up one level, goes up to the parent directory.

  • cd ../..: goes up two levels, can be combined endlessly to move between folders.

  • ~: root directory, moves the terminal to the root directory for the user.

  • clear: clears out the terminal and all the text.

  • mkdir ____: make directory: makes a folder with the provided name at the current directory.

  • touch: make a file at the current directory.

  • cp source destination: copy to location, set the location of the file you want to copy, and where to copy it to.

  • mv: move, allows you to move files around

  • rm: remove file, this will only specifically remove a file.

  • rmdir ____: deletes an empty directory.

  • rm -R ____: deletes all the content of a folder, forever, no return.

  • rm -iR ____: deletes all the content of a folder, but asks about every file before it does.

  • ↕ arrows: Re types out previous commands. God sent and huge time saver.

  • code .: Opens vscode at this location.

set user info for git on terminal

Login Info

  • git config --global user.name "____"

Mac Specific

shell command

  • Open Terminal found in Finder > Applications > Utilities
  • In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES
  • Press return
  • Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.

Hey there, how are you doing today?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 87.1%
  • JavaScript 12.9%