CSE 3901 Midterm 1 EXAM
|\ |\ |\ |\ |\
QUEDTIONS WITH ANSWERS |\ |\
Git Repository - CORRECT ANSWERS ✔✔working tree + store +
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
index
Git Working Tree - CORRECT ANSWERS ✔✔project itself
|\ |\ |\ |\ |\ |\ |\ |\
Ordinary directory with files & subdirectories
|\ |\ |\ |\ |\
Git Store - CORRECT ANSWERS ✔✔history of project
|\ |\ |\ |\ |\ |\ |\
Git Index - CORRECT ANSWERS ✔✔virtual snapshot
|\ |\ |\ |\ |\ |\ |\
Gateway for moving changes in the working tree into the store
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
Git History - CORRECT ANSWERS ✔✔DAG of commits
|\ |\ |\ |\ |\ |\ |\ |\
Each commit represents a complete snapshot of the entire
|\ |\ |\ |\ |\ |\ |\ |\ |\
project
Git Revision - CORRECT ANSWERS ✔✔Just the manual editing of
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
the file
|\
,Git Commit - CORRECT ANSWERS ✔✔updates head and branch
|\ |\ |\ |\ |\ |\ |\ |\ |\
(permanent)
identified by a hash |\ |\ |\
Git Branch - CORRECT ANSWERS ✔✔a pointer to a commit
|\ |\ |\ |\ |\ |\ |\ |\ |\
how to add git branch - CORRECT ANSWERS ✔✔git branch
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
branchname
git checkout branchname
|\ |\
how to change git branch - CORRECT ANSWERS ✔✔git checkout
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
branchname
Git Head - CORRECT ANSWERS ✔✔a pointer to a branch
|\ |\ |\ |\ |\ |\ |\ |\ |\
(where you're at)
|\ |\
Git Add - CORRECT ANSWERS ✔✔adds the submission
|\ |\ |\ |\ |\ |\ |\
how to add (all steps) - CORRECT ANSWERS ✔✔git add name.rb
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
git commit -m "comment"
|\ |\ |\
git push remote_name branch_name
|\ |\ |\
Git Checkout - CORRECT ANSWERS ✔✔moves head to look at
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
another branch |\
,Git Merge - CORRECT ANSWERS ✔✔brings two together, adds
|\ |\ |\ |\ |\ |\ |\ |\ |\
new commit |\
Git Fast-Forward Merge - CORRECT ANSWERS ✔✔bring old into
|\ |\ |\ |\ |\ |\ |\ |\ |\
new head |\
Git Fetch - CORRECT ANSWERS ✔✔bring in commits that given
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
user lacks |\
Git Push - CORRECT ANSWERS ✔✔opposite to fetch. Give
|\ |\ |\ |\ |\ |\ |\ |\ |\
someone a change |\ |\
Git Pull - CORRECT ANSWERS ✔✔combines fetch and merge
|\ |\ |\ |\ |\ |\ |\ |\
Git No Conflict Merge - CORRECT ANSWERS ✔✔Automatically
|\ |\ |\ |\ |\ |\ |\ |\
commits
Distributed version control - CORRECT ANSWERS ✔✔Multiple|\ |\ |\ |\ |\ |\ |\
people, distributed across network
|\ |\ |\ |\
- each person has their own repository
|\ |\ |\ |\ |\ |\
- units of data movement: changesets
|\ |\ |\ |\ |\
Number of repositories per team - CORRECT ANSWERS ✔✔n+1.
|\ |\ |\ |\ |\ |\ |\ |\
1 shared, 1 local for each
|\ |\ |\ |\ |\
, Discard Changes in Git : reset - CORRECT ANSWERS ✔✔git reset
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
--hard
|\
git clean --dry-run
|\ |\
git clean --force
|\ |\
Discard Commit in Git : reset - CORRECT ANSWERS ✔✔git reset --
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\
hard HEAD~1 |\
Strongly Typed Language - CORRECT ANSWERS ✔✔Classes
|\ |\ |\ |\ |\ |\ |\
determine valid operations |\ |\
Interpreted Program - CORRECT ANSWERS ✔✔Run a program
|\ |\ |\ |\ |\ |\ |\ |\
directly, without compiling
|\ |\
pro: |\
platform independence |\
read-eval-print loop (REPL) |\ |\
reflection
con:
speed
later error detection
|\ |\
Dynamically typed - CORRECT ANSWERS ✔✔objects have types,
|\ |\ |\ |\ |\ |\ |\ |\
variables don't |\
|\ |\ |\ |\ |\
QUEDTIONS WITH ANSWERS |\ |\
Git Repository - CORRECT ANSWERS ✔✔working tree + store +
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
index
Git Working Tree - CORRECT ANSWERS ✔✔project itself
|\ |\ |\ |\ |\ |\ |\ |\
Ordinary directory with files & subdirectories
|\ |\ |\ |\ |\
Git Store - CORRECT ANSWERS ✔✔history of project
|\ |\ |\ |\ |\ |\ |\
Git Index - CORRECT ANSWERS ✔✔virtual snapshot
|\ |\ |\ |\ |\ |\ |\
Gateway for moving changes in the working tree into the store
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
Git History - CORRECT ANSWERS ✔✔DAG of commits
|\ |\ |\ |\ |\ |\ |\ |\
Each commit represents a complete snapshot of the entire
|\ |\ |\ |\ |\ |\ |\ |\ |\
project
Git Revision - CORRECT ANSWERS ✔✔Just the manual editing of
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
the file
|\
,Git Commit - CORRECT ANSWERS ✔✔updates head and branch
|\ |\ |\ |\ |\ |\ |\ |\ |\
(permanent)
identified by a hash |\ |\ |\
Git Branch - CORRECT ANSWERS ✔✔a pointer to a commit
|\ |\ |\ |\ |\ |\ |\ |\ |\
how to add git branch - CORRECT ANSWERS ✔✔git branch
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
branchname
git checkout branchname
|\ |\
how to change git branch - CORRECT ANSWERS ✔✔git checkout
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
branchname
Git Head - CORRECT ANSWERS ✔✔a pointer to a branch
|\ |\ |\ |\ |\ |\ |\ |\ |\
(where you're at)
|\ |\
Git Add - CORRECT ANSWERS ✔✔adds the submission
|\ |\ |\ |\ |\ |\ |\
how to add (all steps) - CORRECT ANSWERS ✔✔git add name.rb
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
git commit -m "comment"
|\ |\ |\
git push remote_name branch_name
|\ |\ |\
Git Checkout - CORRECT ANSWERS ✔✔moves head to look at
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
another branch |\
,Git Merge - CORRECT ANSWERS ✔✔brings two together, adds
|\ |\ |\ |\ |\ |\ |\ |\ |\
new commit |\
Git Fast-Forward Merge - CORRECT ANSWERS ✔✔bring old into
|\ |\ |\ |\ |\ |\ |\ |\ |\
new head |\
Git Fetch - CORRECT ANSWERS ✔✔bring in commits that given
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
user lacks |\
Git Push - CORRECT ANSWERS ✔✔opposite to fetch. Give
|\ |\ |\ |\ |\ |\ |\ |\ |\
someone a change |\ |\
Git Pull - CORRECT ANSWERS ✔✔combines fetch and merge
|\ |\ |\ |\ |\ |\ |\ |\
Git No Conflict Merge - CORRECT ANSWERS ✔✔Automatically
|\ |\ |\ |\ |\ |\ |\ |\
commits
Distributed version control - CORRECT ANSWERS ✔✔Multiple|\ |\ |\ |\ |\ |\ |\
people, distributed across network
|\ |\ |\ |\
- each person has their own repository
|\ |\ |\ |\ |\ |\
- units of data movement: changesets
|\ |\ |\ |\ |\
Number of repositories per team - CORRECT ANSWERS ✔✔n+1.
|\ |\ |\ |\ |\ |\ |\ |\
1 shared, 1 local for each
|\ |\ |\ |\ |\
, Discard Changes in Git : reset - CORRECT ANSWERS ✔✔git reset
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\
--hard
|\
git clean --dry-run
|\ |\
git clean --force
|\ |\
Discard Commit in Git : reset - CORRECT ANSWERS ✔✔git reset --
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\
hard HEAD~1 |\
Strongly Typed Language - CORRECT ANSWERS ✔✔Classes
|\ |\ |\ |\ |\ |\ |\
determine valid operations |\ |\
Interpreted Program - CORRECT ANSWERS ✔✔Run a program
|\ |\ |\ |\ |\ |\ |\ |\
directly, without compiling
|\ |\
pro: |\
platform independence |\
read-eval-print loop (REPL) |\ |\
reflection
con:
speed
later error detection
|\ |\
Dynamically typed - CORRECT ANSWERS ✔✔objects have types,
|\ |\ |\ |\ |\ |\ |\ |\
variables don't |\