reading-notes

Reading Notes for Codefellows!


Project maintained by AlanYHung Hosted on GitHub Pages — Theme by mattgraham

Code 102

Reading 03

Version Control Types

  1. Local Version Control - Developer controls versions locally on own machine.
  2. Centralized Version Control (CVCS) - Team of Developers stores versions in a central location online/network.
  3. Distributed Version Control (DVCS) - Multiple Developers create clones of the Central Repository, so can replace any lost data.

What is Git?

  1. Git is a DVCS file system made up of snapshots.
  2. Git relies on local operations for speed in order to remove the need to fetch project history.
  3. Git tracks all changes and detects file corruption
  4. Git is set up to minimize the loss of data from data corruption.
  5. 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

  1. git config –global user.name “Your Name”
  2. git config –global user.email “Your Email”
  3. git config –global user.name (should return Jane Smith)
  4. git config –global user.email (should return example@email.com)
  5. git config –global core.editor emacs (Default Text Editor)
  6. git config –list
  7. Help Commands
    1. git help command
    2. git command –help
    3. man git-command
  8. git init
  9. git add *.c
  10. git add LICENSE
  11. git commit -m “any message here”
  12. git clone
  13. git clone
  14. git status
  15. git commit -a (commits all changes)
  16. git push origin main
  17. git stash (Use to hide changed files from showing up in the directory until ready to be committed)
  18. git stash apply (Applies Stash changes)
  19. git remote
  20. git remote -v (To view all remote URLs)

Resources

<– Back