Skip to content

Latest commit

 

History

History
202 lines (117 loc) · 4.98 KB

1 Getting Started fbe17afadb64427e8bb2eb5e0d6fc646.md

File metadata and controls

202 lines (117 loc) · 4.98 KB

1. Getting Started

Date: April 21, 2024

Topic: Version Control

Recall

What is version control?

Version control is most useful for?

Notes

  • Stores specific versions of a file that can be recalled later.
  • Can be done with any type of file.
  • Useful in web/app design.
📌 **SUMMARY: Version control helps in saving a version of a file helping in comparing with the latest version and to revert back in case of problems in newer one.**

Date: April 21, 2024

Topic: Local Version Control Systems

Recall

What was used for version controlling in early days?

What was RCS and how did it work?

Notes

  • Earlier people used to create time-stamped directories for version control.
  • To solve this programmers developed simple database to track file history.
  • Example: RCS worked by keeping patch sets in a special format, to recreate that file in a specific point in time.
📌 **SUMMARY: RCS was a version control system that used to store version of files in a special format as a patch.**

Date: April 21, 2024

Topic: Centralized Version Control Systems

Recall

What are centralized version control system?

What’s their downside?

Notes

  • To allow collaboration between developer under different versions of files, Centralized Version Control Systems were made, eg: Subversion
  • They suffer from single point of failure, as there is a single server on which everyone collaborates
📌 **SUMMARY: Centralized VCS provided a method for collaboration but suffered from single point of failure.**

Date: April 21, 2024

Topic: Distributed Version Control Systems

Recall

What are Distributed VCS?

Example of VCSs?

Notes

  • Solves the problem of centralized vcs.
  • Full history of the file is stored on client computers and in case server dies, the full history of those files can be reuploaded.

Untitled

  • Git, Mercurial are example of distributed version control systems.
📌 **SUMMARY: Distributed VCSs allow collaboration and provide reliability of file versioning by storing the full file version on the client side.**

Date: April 21, 2024

Topic: Git

Recall

What did git improve over previous VCS?

Major difference between Git and other VCSs?

The way Git does file versioning helps in creating branches.

Notes

  • Git’s goal was to be fast, lightweight, powerful and fully distributed
  • Other VCSs store a file and incremental changes made to the file and versions.
  • Git stores different versions of files as a snapshot and not incremental changes.
  • This makes git like miniature filesystem.

Untitled

📌 **SUMMARY: Git reconsiders the way versioning systems used to work and acts like a filesystem.**

Date: April 21, 2024

Topic: Git Benefits

Recall

What are the benefits of git?

How is integrity conserved in git?

Why is it safe to do experiments on file using git without having to worry reverting back to original version?

Notes

  • Almost all operations in git is local:
    • All of the snapshots of the file is stored locally and hence switching versions work on light speed as compared to Central VCS.
    • Git can work offline and does not require internet. Commit now, Push later.
  • Integrity:
    • Everything in Git is checksummed before it is stored and referred through it.
    • Checksum is done through SHA-1, which is generated by the file content or the directory structure in Git.
    • Little changes or file corruption will change the hash generated and hence will be caught.
  • Auto-Save:
    • Generally all actions on Git add data to the database.
    • This means most actions we do on Git are reversible.
📌 **SUMMARY: Git comes with integrity, speed and reversible acts features that help developers tons as compared to other DVCS.**

Date: April 21, 2024

Topic: Three States a file can reside in

Recall

Three states git files can be in?

Notes

  • Modified/Working Directory: File changed but uncommitted to database.
  • Staged/Index: File marked to go into commit snapshot.
  • Committed/.git directory: File safely stored in database.

Untitled

📌 **SUMMARY: The three states that a file is in determines what action to take next to save the file or checkout a particular version of a file.**

Date: April 21, 2024

Topic: Commands to get help

Recall

Commands to open manual page for a git action.

Notes

  • git help
  • git —help
  • man git-
  • Concise manual page: git -h
📌 **SUMMARY: Git help commands provide a refresher on some of the commands and their option/arguments.**

2. Git Basics