Version Control Flashcards
Repository
Holds files and their versions
-remembers every committed change to every controlled files
Copy-modify-merge
Can look at new changes make them to new version so they have been merged
- makes concurrent changes
- only shows changes
Git
-a framework for version control system workflows
-tracks changes to files and directories
-permits concurrent access
GitHub: popular services for repositories
VCS repository
Is a store of data and metadata
- data stored similar looking to a tree
- combines a local repo with a working copy
Push
Write into repo
Pull
Reading repo
-is actually two cmds fetch and merge (origin/master)
Git cycle
- Clone to make a working copy or init plus other actions creates a new local repo
- In working copy edit files or make new ones
- If needed update local copy with pull to pick up changes by others
- Build/run/test/view/render/read
- Add the name of changed files that are ready to be committed (if don’t use add git won’t keep track of changes)
- Commit you changes to local repo (add message, keeps record of it locally)
- If changes aren’t ready go back to 2
- Push committed changes to remote repo
- Go to step 2
Commit
- each commit results in the creation of a new snapshot
- commit is not the same as push
Git log
Gives list of snapshots (commits)
Git status
Reports of files need to be committed
Branch
-are pointers to certain commits
-master is the main branch
-origin is the remote repo
-git pull == git pull origin master
-git push == git push origin master
Ex) 18431a0
Git add
Results in a file/directory being staged for commit
Git ignore
- files we want to ignore
* .o *.class
Git fetch
See changes
Git diff
Shows differences