Skip to content

Instantly share code, notes, and snippets.

@annajmorton
Last active June 1, 2016 20:13
Show Gist options
  • Save annajmorton/2f4b60ecfcdad1a251d94a5b8155bb27 to your computer and use it in GitHub Desktop.
Save annajmorton/2f4b60ecfcdad1a251d94a5b8155bb27 to your computer and use it in GitHub Desktop.
2-3.1.2 Notes - 05/31/2016

#Github

##cheat sheets: kings5_git-cheat-sheet kings5_git-cheat1 kings5_git-cheat2

##practice your skillzzz practice git commands

##Using Git A common way to manage the versions of your files and content is to name files with increasing levels of description. Example: Resume.pdf, Resume_Final.pdf, Resume_Final_Monday.pdf, Resume_FINAL_to_print.pdf, and Resume_print_before_interview.pdf vs. a permanent record with a time machine that can enter paralel dimensions

Git, the Big Picture

  • Git is a permanent record.
  • Git is a time machine that allows us to travel through that permanent record.
  • Git also allows us to travel into parallel universes (branches)
  • GitHub is a service that hosts remote repositories.

Git allows us to version our files and their contents by allowing us to take snapshots called commits. Our filenames remain the same and the history of commits creates a permanent record for our code and contents that have been in that file.

Git Workflow

"Commit early, commit often" and "If code is not in GitHub then it doesn't exist"

  • cd into your local git repo (~/vagrant-lamp/codeup.dev/)
  • type git status between each step to orient yourself.
  • Add or modify your files inside your local git repo.
  • Add individual files
    • git add hello_world.html or git add README.md
    • git add public/css/style.css
  • git add -A to add all files (not recommended, but useful)
  • git commit in order to create a new commit of your added files.
  • Write a useful git message that explains what you're doing and why.
  • git push origin master maybe read some stuff about markdown

##more workflow notes

git
    permanent record
    time machine

repositories
    local - on your own machine
    remote - on github.com

starting a repo
    create a new remote repo at http://github.com/new
    create a new local repo in the local folder
        - cd ~/vagrant-lamp/sites/codeup.dev/
        - git init
        - git add filename.html css/site.css
            - git add .
            - git add -A     "adds all the things"
        - git commit
        - git status at any time
        - git remote add origin <remote repo addy>
        - git push -u origin master

working in an existing repo
    - add and modify your files
    - type `git status`
    - `git add filename.html` or git add -A
    - git commit
    - git push origin master

##globally gitignore stuff!

checkout this link

#Javascript OH MY! ##review questions:

  1. what does it mean for a programing language to be dynamically typed?
  2. why would this characteristic be useful?
  3. what is the difference between undefined and null?
  4. if var a=0;, what is the difference between a++ and ++a?
  5. Which of the following will return true?:
isNaN(false);
isNaN(['crazy','town']);
isNaN([]);
isNaN("");

##naming convention:

  1. variable and function names should be in camelCaps (e.g. hairColor or bloodType)
  2. don't use spaces
  3. don't start with numbers
@annajmorton
Copy link
Author

kings5_git-cheat-sheet
kings5_git-cheat1
kings5_git-cheat2

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