#Github
##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 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.
"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
orgit 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!
#Javascript OH MY! ##review questions:
- what does it mean for a programing language to be dynamically typed?
- why would this characteristic be useful?
- what is the difference between
undefined
andnull
? - if
var a=0;
, what is the difference betweena++
and++a
? - Which of the following will return true?:
isNaN(false);
isNaN(['crazy','town']);
isNaN([]);
isNaN("");
##naming convention:
- variable and function names should be in camelCaps (e.g. hairColor or bloodType)
- don't use spaces
- don't start with numbers