Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 932 Bytes

GitConcepts.md

File metadata and controls

51 lines (30 loc) · 932 Bytes

Overview of Git Concepts, Elements and Vocabulary

  • 3 trees - working directory, index/stage, commits

  • Commit

  • Stage/Index and git add file; Change file => means new changes won't be in commit.

  • SHA

    • content-based hash value
    • effectively unique.
  • Tag

  • Branch

    • master
  • add & commit and push

    • local and remote repositores - commit versus publish
  • garbage collection of commits that are not reachable.

  • .git directory

    • config
    • can git clone or cp -r
      • What's the difference?
  • https://zwischenzugs.com/2018/10/30/five-things-i-wish-id-known-about-git/

  • Three trees OR 4 stages

    • working directory
    • index/cache
    • commited
    • remote repository
  • Reference (ref) = pointer to a commit hash, branch, tag, HEAD

  • Detached head

Revert and undo a commit.

Split a repository into separate repositories.

  • Keep the history.

Combine commits into a single commit - squashing.