reading-notes
Reading Notes for Codefellows!
Project maintained by AlanYHung
Hosted on GitHub Pages — Theme by mattgraham
Code 102
Reading 03
Version Control Types
- Local Version Control - Developer controls versions locally on own machine.
- Centralized Version Control (CVCS) - Team of Developers stores versions in a central location online/network.
- Distributed Version Control (DVCS) - Multiple Developers create clones of the Central Repository, so can replace any lost data.
What is Git?
- Git is a DVCS file system made up of snapshots.
- Git relies on local operations for speed in order to remove the need to fetch project history.
- Git tracks all changes and detects file corruption
- Git is set up to minimize the loss of data from data corruption.
- Git has 3 main stages Committed, modified, and staged.
Git was developed by Linus Torvalds (chief architect of Linux Kernel) in response to the conflict between the Linux community and BitKeeper to make a DVCS similar to the structure of BitKeeper.
Setup Git Resources
Windows
http://git-scm.com/download/win
http://windows.github.com
GUI
https://git-scm.com/downloads/guis
Git Commands
- git config –global user.name “Your Name”
- git config –global user.email “Your Email”
- git config –global user.name (should return Jane Smith)
- git config –global user.email (should return example@email.com)
- git config –global core.editor emacs (Default Text Editor)
- git config –list
- Help Commands
- git help command
- git command –help
- man git-command
- git init
- git add *.c
- git add LICENSE
- git commit -m “any message here”
- git clone
- git clone
- git status
- git commit -a (commits all changes)
- git push origin main
- git stash (Use to hide changed files from showing up in the directory until ready to be committed)
- git stash apply (Applies Stash changes)
- git remote
- git remote -v (To view all remote URLs)
Resources
<– Back