$ #"" 9abfea0f… #"" refs !"" heads #"" tags > git add • index contains a list of files metadata: • permissions • SHA-1 • name • the name of blob files are SHA-1s • Their content is a binary with the contents of the file they are storing SNAPSHOTTING
objects $ #"" … !"" refs $ !"" heads $ $ !"" master $ $ #"" my-branch $ #"" tags • A branch is just a text file with a reference to a commit • Branches are automatically updated when creating a new commit
!"" objects $ !"" … !"" refs $ !"" heads $ !"" !"" … $ #"" tags $ #"" my-lightweight-tag • A lightweight tag is a file text with a reference to a commit
!"" objects $ !"" … $ !"" 3e $ #"" 38efa5ea1f !"" refs $ !"" heads $ !"" !"" … $ #"" tags $ !"" my-annotated-tag $ #"" my-lightweight-tag • An annotated tag creates a tag object (very similar to a commit object) and points to it
three step process: 1. Move the current branch to REF 2. Revert index files to look like REF 3. Revert working directory files to look like REF REVERTING
config !"" objects $ !"" … !"" refs $ !"" heads $ !"" !"" … $ !"" remotes $ $ !"" origin $ $ $ !"" master $ $ $ #"" my-branch $ #"" tags • A remote is nothing but a directory with a file for each branch • Remote branches are text files with the SHA-1 of the commit they are pointing to
HEAD • Use it when you want to pick a single commit (a fix) and have it in your branch • Use it if you messed up real bad your history and want to recreate a branch
release wise operations • bugfix • Same as a regular feature (might be merged to release branches) • hotfix • Branched from master, merges in master and develop
a console to interact with git • pcottle.github.io/learnGitBranching #A complete tutorial of Git branches, includes rebasing and an awesome visualization • git-it # Online workshop from your terminal