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