SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
New Views on your History
with git replace
Christian Couder, Murex
chriscool@tuxfamily.org
OSDC.fr 2013
October 5, 2013
About Git
A Distributed Version Control System
(DVCS):
● created by Linus Torvalds
● maintained by Junio Hamano
● since 2005
● prefered VCS among open source
developers
Git Design
Git is made of these things:
● “Objects”
● “Refs”
● config, indexes, logs, hooks,
grafts, packs, ...
Only “Objects” and “Refs” are
transferred from one repository to
another.
Git Objects

● Blob: content of a file
● Tree: content of a directory
● Commit: state of the whole source code
● Tag: stamp on an object
Git Objects Storage

● Git Objects are stored in a
content addressable database.
● The key to retrieve each Object is the
SHA-1 of the Object’s content.
● A SHA-1 is a 160-bit / 40-hex / 20-byte
hash value which is considered
unique.
Blob
SHA1: e8455...

blob = content of a file
blob

size

/* content of this blob, it can be
anything like an image, a video,
... but most of the time it is
source code like:*/
#include <stdio.h>
int main(void)
{
printf("Hello world!n");
return 0;
}
Example of storing and
retrieving a blob
# echo “Whatever…” | git hash-object -w --stdin
aa02989467eea6d8e0bc68f3663de51767a9f5b1
# git cat-file -p aa02989467
Whatever...
Tree
SHA1: 0de24...
size

tree
blob
tree

hello.c
lib

tree = content of a
directory

e8455...
10af9...

It can point to blobs and
other trees.
Example of storing and
retrieving a tree
# BLOB=aa02989467eea6d8e0bc68f3663de51767a9f5b1
# (printf "100644 whatever.txt0"; echo $BLOB | xxd -r -p)
| git hash-object -t tree -w --stdin
0625da548ef0a7038c44b480f10d5550b2f2f962
# git cat-file -p 0625da548e
100644 blob aa02989467... whatever.txt
Commit
SHA1: 98ca9...
size

commit
tree

0de24...

parents

commit = information
about some changes

()

author

Christian <timestamp>

committer

Christian <timestamp>

My commit message

It points to one tree and 0
or more parents.
Example of storing and
retrieving a commit (1)
# TREE=0625da548ef0a7038c44b480f10d5550b2f2f962
# ME=”Christian Couder <chriscool@tuxfamily.org>”
# DATE=$(date "+%s %z")
# (echo -e "tree $TREEnauthor $ME $DATE";
echo -e "committer $ME $DATEnnfirst commit")
| git hash-object -t commit -w --stdin
37449e955443883a0a888ee100cfd0a7ba7927b3
Example of storing and
retrieving a commit (2)
# git cat-file -p 37449e9554
tree 0625da548ef0a7038c44b480f10d5550b2f2f962
author Christian Couder <chriscool@tuxfamily.org> 1380447450 +0200
committer Christian Couder <chriscool@tuxfamily.org> 1380447450 +0200
first commit
Git Objects Relations
SHA1: e84c7...
Commit

SHA1: 0de24...

size

tree

29c43...

parents

()

author

Christian

committer

Christian

Blob

size

SHA1: 29c43...
int main() { ... }
Tree

Initial commit

blob
tree

size
hello.c 0de24...
doc

98ca9...

SHA1: 98ca9...
Tree

size

blob readme 677f4...
blob

SHA1: 98ca9...
Commit
tree

install

23ae9...

size
5c11f...

parents

(e84c7...)

author

Arnaud

committer

Arnaud

Change hello.c

SHA1: 5c11f...
SHA1: bc789...
Tree
blob
tree

size
hello.c bc789...
doc

98ca9...

Blob

size

int main(void) { ... }
Git Refs
● Head: branch,
.git/refs/heads/
● Tag: lightweight tag,
.git/refs/tags/
● Remote: distant repository,
.git/refs/remotes/
● Note: note attached to an object,
.git/refs/notes/
● Replace: replacement of an object,
.git/refs/replace/
Example of storing and
retrieving a branch
# git update-ref refs/heads/master 37449e9554
# git rev-parse master
37449e955443883a0a888ee100cfd0a7ba7927b3
# git reset --hard master
HEAD is now at 37449e9 first commit
# cat whatever.txt
Whatever...
Result from previous examples
master

commit 37449e9554

tree 0625da548e

blob aa02989467
Commits in Git form a DAG
(Directed Acyclic Graph)

● history direction is from left to right
● new commits point to their parents
git bisect

B

● B introduces a bad behavior called "bug" or
"regression"
● red commits are called "bad"
● blue commits are called "good"
Problem when bisecting
Sometimes the commit that introduced a bug
will be in an untestable area of the graph.
For example:
W

X

X1

X2

X3

Y

Z

Commit X introduced a breakage, later fixed
by commit Y.
Possible solutions
Possible solutions to bisect anyway:
● apply a patch before testing and remove it
afterwards (can be done using "git cherrypick"), or
● create a fixed up branch (can be done with
"git rebase -i"), for example:
X+Y

W

X

X1'

X1

X2'

X2

X3'

X3

Z'

Y

Z

Z1
A good solution
The idea is that we will replace Z with Z' so that
we bisect from the beginning using the fixed up
branch.
X+Y

W

X

X1'

X1

$ git replace Z Z'

X2'

X2

X3'

X3

Z'

Y

Z1

Z
Grafts
Created mostly for projects like linux
kernel with old repositories.
● “.git/info/grafts” file
● each line describe parents of a
commit
● <commit> <parent> [<parent>]*
● this overrides the content in the
commit
Problem with Grafts

They are neither objects nor refs, so
they cannot be easily transferred.
We need something that is either:
● an object, or
● a ref
Solution, part 1: replace ref

● It is a ref in .git/refs/replace/
● Its name is the SHA-1 of the
object that should be replaced.
● It contains, so it points to, the
SHA-1 of the replacement object.
Solution, part 2: git replace

● git replace [ -f ] <object> <replacement>:
to create a replace ref
● git replace -d <object>:
to delete a replace ref
● git replace [ -l [ pattern ] ]:
to list some replace refs
Replace ref transfer
● as with heads, tags, notes, remotes
● except that there are no shortcuts and
you must be explicit
● refspec: refs/replace/*:refs/replace/*
● refspec can be configured (in .git/config),
or used on the command line (after git
push/fetch <remote>)
Creating replacement objects
When it is needed the following commands
can help:
● git rebase [ -i ]
● git cherry-pick
● git hash-object
● git filter-branch
What can it be used for?
Create new views of your history.
Right now only 2 views are possible:
● the view with all the replace refs enabled
● the view with all the replace refs disabled,
using --no-replace-objects or the
GIT_NO_REPLACE_OBJECTS
environment variable
Why new views?
● split old and new history or merge them
● fix bugs to bisect on a clean history
● fix mistakes in author, committer,
timestamps
● remove big files to have something lighter
to use, when you don’t need them
● prepare a repo cleanup
● mask/unmask some steps
● ...
Limitations
● everything is still in the repo
● so the repo is still big
● there are probably bugs
● confusing?
● ...
Current and future work
● a script to replace grafts
● fix bugs
● allow subdirectories in .git/refs/replace/
● maybe allow “views” as set of active
subdirectories
● ...
Considerations
● best of both world: immutability and
configurability of history
● no true view
● history is important for freedom
Many thanks to:
● Junio Hamano (comments, help, discussions,
reviews, improvements),
● Ingo Molnar,
● Linus Torvalds,
● many other great people in the Git and Linux
communities, especially: Andreas Ericsson,
Johannes Schindelin, H. Peter Anvin, Daniel
Barkalow, Bill Lear, John Hawley, ...
● OSDC/OWF organizers and attendants,
● Murex the company I am working for.
Questions ?

Más contenido relacionado

La actualidad más candente

Git Introduction
Git IntroductionGit Introduction
Git Introduction
Gareth Hall
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
razasayed
 

La actualidad más candente (20)

Essential Git and Github commands
Essential Git and Github commandsEssential Git and Github commands
Essential Git and Github commands
 
Workshop on Source control, git merge walkthroughs
Workshop on Source control, git merge walkthroughsWorkshop on Source control, git merge walkthroughs
Workshop on Source control, git merge walkthroughs
 
Git advanced
Git advancedGit advanced
Git advanced
 
Git
GitGit
Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to git
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Git 101
Git 101Git 101
Git 101
 
Intro to Git
Intro to GitIntro to Git
Intro to Git
 
SCM Boot Camp
SCM Boot CampSCM Boot Camp
SCM Boot Camp
 
Formation git
Formation gitFormation git
Formation git
 
Git push to build, test and scan your containers
Git push to build, test and scan your containersGit push to build, test and scan your containers
Git push to build, test and scan your containers
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
 

Similar a New Views on your History with git replace

Introduction of Git
Introduction of GitIntroduction of Git
Introduction of Git
Wayne Chen
 

Similar a New Views on your History with git replace (20)

Git in action
Git in actionGit in action
Git in action
 
How git works
How git works  How git works
How git works
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of Git
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
 
Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)
 
Learning git
Learning gitLearning git
Learning git
 
Git, Fast and Distributed Source Code Management
Git, Fast and Distributed Source Code ManagementGit, Fast and Distributed Source Code Management
Git, Fast and Distributed Source Code Management
 
Six3 Getting Git
Six3 Getting GitSix3 Getting Git
Six3 Getting Git
 
Command line git
Command line gitCommand line git
Command line git
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 
Git training
Git trainingGit training
Git training
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Embedded Systems: Lecture 11: Introduction to Git & GitHub (Part 2)
Embedded Systems: Lecture 11: Introduction to Git & GitHub (Part 2)Embedded Systems: Lecture 11: Introduction to Git & GitHub (Part 2)
Embedded Systems: Lecture 11: Introduction to Git & GitHub (Part 2)
 
Git: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commandsGit: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commands
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developers
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git in the European Parliament
Git in the European ParliamentGit in the European Parliament
Git in the European Parliament
 
Understanding GIT
Understanding GITUnderstanding GIT
Understanding GIT
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

New Views on your History with git replace

  • 1. New Views on your History with git replace Christian Couder, Murex chriscool@tuxfamily.org OSDC.fr 2013 October 5, 2013
  • 2. About Git A Distributed Version Control System (DVCS): ● created by Linus Torvalds ● maintained by Junio Hamano ● since 2005 ● prefered VCS among open source developers
  • 3. Git Design Git is made of these things: ● “Objects” ● “Refs” ● config, indexes, logs, hooks, grafts, packs, ... Only “Objects” and “Refs” are transferred from one repository to another.
  • 4. Git Objects ● Blob: content of a file ● Tree: content of a directory ● Commit: state of the whole source code ● Tag: stamp on an object
  • 5. Git Objects Storage ● Git Objects are stored in a content addressable database. ● The key to retrieve each Object is the SHA-1 of the Object’s content. ● A SHA-1 is a 160-bit / 40-hex / 20-byte hash value which is considered unique.
  • 6. Blob SHA1: e8455... blob = content of a file blob size /* content of this blob, it can be anything like an image, a video, ... but most of the time it is source code like:*/ #include <stdio.h> int main(void) { printf("Hello world!n"); return 0; }
  • 7. Example of storing and retrieving a blob # echo “Whatever…” | git hash-object -w --stdin aa02989467eea6d8e0bc68f3663de51767a9f5b1 # git cat-file -p aa02989467 Whatever...
  • 8. Tree SHA1: 0de24... size tree blob tree hello.c lib tree = content of a directory e8455... 10af9... It can point to blobs and other trees.
  • 9. Example of storing and retrieving a tree # BLOB=aa02989467eea6d8e0bc68f3663de51767a9f5b1 # (printf "100644 whatever.txt0"; echo $BLOB | xxd -r -p) | git hash-object -t tree -w --stdin 0625da548ef0a7038c44b480f10d5550b2f2f962 # git cat-file -p 0625da548e 100644 blob aa02989467... whatever.txt
  • 10. Commit SHA1: 98ca9... size commit tree 0de24... parents commit = information about some changes () author Christian <timestamp> committer Christian <timestamp> My commit message It points to one tree and 0 or more parents.
  • 11. Example of storing and retrieving a commit (1) # TREE=0625da548ef0a7038c44b480f10d5550b2f2f962 # ME=”Christian Couder <chriscool@tuxfamily.org>” # DATE=$(date "+%s %z") # (echo -e "tree $TREEnauthor $ME $DATE"; echo -e "committer $ME $DATEnnfirst commit") | git hash-object -t commit -w --stdin 37449e955443883a0a888ee100cfd0a7ba7927b3
  • 12. Example of storing and retrieving a commit (2) # git cat-file -p 37449e9554 tree 0625da548ef0a7038c44b480f10d5550b2f2f962 author Christian Couder <chriscool@tuxfamily.org> 1380447450 +0200 committer Christian Couder <chriscool@tuxfamily.org> 1380447450 +0200 first commit
  • 13. Git Objects Relations SHA1: e84c7... Commit SHA1: 0de24... size tree 29c43... parents () author Christian committer Christian Blob size SHA1: 29c43... int main() { ... } Tree Initial commit blob tree size hello.c 0de24... doc 98ca9... SHA1: 98ca9... Tree size blob readme 677f4... blob SHA1: 98ca9... Commit tree install 23ae9... size 5c11f... parents (e84c7...) author Arnaud committer Arnaud Change hello.c SHA1: 5c11f... SHA1: bc789... Tree blob tree size hello.c bc789... doc 98ca9... Blob size int main(void) { ... }
  • 14. Git Refs ● Head: branch, .git/refs/heads/ ● Tag: lightweight tag, .git/refs/tags/ ● Remote: distant repository, .git/refs/remotes/ ● Note: note attached to an object, .git/refs/notes/ ● Replace: replacement of an object, .git/refs/replace/
  • 15. Example of storing and retrieving a branch # git update-ref refs/heads/master 37449e9554 # git rev-parse master 37449e955443883a0a888ee100cfd0a7ba7927b3 # git reset --hard master HEAD is now at 37449e9 first commit # cat whatever.txt Whatever...
  • 16. Result from previous examples master commit 37449e9554 tree 0625da548e blob aa02989467
  • 17. Commits in Git form a DAG (Directed Acyclic Graph) ● history direction is from left to right ● new commits point to their parents
  • 18. git bisect B ● B introduces a bad behavior called "bug" or "regression" ● red commits are called "bad" ● blue commits are called "good"
  • 19. Problem when bisecting Sometimes the commit that introduced a bug will be in an untestable area of the graph. For example: W X X1 X2 X3 Y Z Commit X introduced a breakage, later fixed by commit Y.
  • 20. Possible solutions Possible solutions to bisect anyway: ● apply a patch before testing and remove it afterwards (can be done using "git cherrypick"), or ● create a fixed up branch (can be done with "git rebase -i"), for example: X+Y W X X1' X1 X2' X2 X3' X3 Z' Y Z Z1
  • 21. A good solution The idea is that we will replace Z with Z' so that we bisect from the beginning using the fixed up branch. X+Y W X X1' X1 $ git replace Z Z' X2' X2 X3' X3 Z' Y Z1 Z
  • 22. Grafts Created mostly for projects like linux kernel with old repositories. ● “.git/info/grafts” file ● each line describe parents of a commit ● <commit> <parent> [<parent>]* ● this overrides the content in the commit
  • 23. Problem with Grafts They are neither objects nor refs, so they cannot be easily transferred. We need something that is either: ● an object, or ● a ref
  • 24. Solution, part 1: replace ref ● It is a ref in .git/refs/replace/ ● Its name is the SHA-1 of the object that should be replaced. ● It contains, so it points to, the SHA-1 of the replacement object.
  • 25. Solution, part 2: git replace ● git replace [ -f ] <object> <replacement>: to create a replace ref ● git replace -d <object>: to delete a replace ref ● git replace [ -l [ pattern ] ]: to list some replace refs
  • 26. Replace ref transfer ● as with heads, tags, notes, remotes ● except that there are no shortcuts and you must be explicit ● refspec: refs/replace/*:refs/replace/* ● refspec can be configured (in .git/config), or used on the command line (after git push/fetch <remote>)
  • 27. Creating replacement objects When it is needed the following commands can help: ● git rebase [ -i ] ● git cherry-pick ● git hash-object ● git filter-branch
  • 28. What can it be used for? Create new views of your history. Right now only 2 views are possible: ● the view with all the replace refs enabled ● the view with all the replace refs disabled, using --no-replace-objects or the GIT_NO_REPLACE_OBJECTS environment variable
  • 29. Why new views? ● split old and new history or merge them ● fix bugs to bisect on a clean history ● fix mistakes in author, committer, timestamps ● remove big files to have something lighter to use, when you don’t need them ● prepare a repo cleanup ● mask/unmask some steps ● ...
  • 30. Limitations ● everything is still in the repo ● so the repo is still big ● there are probably bugs ● confusing? ● ...
  • 31. Current and future work ● a script to replace grafts ● fix bugs ● allow subdirectories in .git/refs/replace/ ● maybe allow “views” as set of active subdirectories ● ...
  • 32. Considerations ● best of both world: immutability and configurability of history ● no true view ● history is important for freedom
  • 33. Many thanks to: ● Junio Hamano (comments, help, discussions, reviews, improvements), ● Ingo Molnar, ● Linus Torvalds, ● many other great people in the Git and Linux communities, especially: Andreas Ericsson, Johannes Schindelin, H. Peter Anvin, Daniel Barkalow, Bill Lear, John Hawley, ... ● OSDC/OWF organizers and attendants, ● Murex the company I am working for.