Congrats on 40k Anthony, thanks for the effort you put into knowledge sharing!
@alexandreboisselet83364 ай бұрын
4:56 I didn’t loose my head 😂
@jaopredoramires4 ай бұрын
Wait what was that move? You can just mv without specifying where to? Or am I missing on curly braces syntax
@anthonywritescode4 ай бұрын
ahah your lucky day! kzbin.info/www/bejne/qGOqYaWYopyLgM0
@BenjaminWheeler05104 ай бұрын
Could this be useful for large teams who all need to clone a repo?
@anthonywritescode4 ай бұрын
yep! we used a version of this at Yelp but before dissociate existed (so lots of corrupted git repos if you forked a non-upstream branch)
@bomarni2 ай бұрын
Out of interest would worktrees help with this workflow or not related?
@anthonywritescode2 ай бұрын
sort of, they solve a different problem and don't remove local ref state (which was one of the goals at least in my situation)
@mrswats4 ай бұрын
Is there a way to dissociate a repo after you have cloned? I'm the way you can unshallow a shallow cloned repository.
@anthonywritescode4 ай бұрын
apparently `git repack -a -d` and then manually deleting the alternates file - a little spooky (but that's all that dissociate does)
@mrswats4 ай бұрын
@@anthonywritescode nice!
@sq5464 ай бұрын
great wideo!
@MrMongoosesRawesome4 ай бұрын
Curious if all-repos could use this? Or maybe it's not necessary since it does a shallow clone?
@anthonywritescode4 ай бұрын
possibly! even with shallow clones there should be some object reuse (at least for the final tree)
@doongjohnlee8204 ай бұрын
Is it same as duplicating the project dir and doing the `git clean -df && git restore .` in the duplicated dir?
@anthonywritescode4 ай бұрын
it depends, the clone will also retrieve any new objects since the original clone (so it's only equivalent if upstream has not diverged)
@FunkyELF4 ай бұрын
I wonder if cloning with --dissociate and --reference actually copies objects on disk or if it creates hardlinks. I know if you `git clone file:///path/to/repo` it'll create new files but if you `git clone /path/to/file` it creates hardlinks.