3 ms·
I don't understand. What's the difference between this and just cloning (not forking) a repo? If it's the same, why not just add a button called "clone" that ap
by edjrage 7y ago
I don't understand. What's the difference between this and just cloning (not forking) a repo? If it's the same, why not just add a button called "clone" that appears in _all_ repos?
- tyrust 7y agoThe biggest benefit will probably be for new programmers following a tutorial that provides a template. The word "clone" means nothing to them. They just want to copy and build off of this project on their own GitHub. Yes, it does sacrifice some learning about git, but once you get someone hooked on programming they will be able to learn the tools later.
- phreack 7y agoI don't get it either, is it literally the same thing a a a clone with a different name?
- imran3740 7y agoNo, this does not preserve the history of the repo, just gives a single commit with the existing files. You might also think of this as cloning, then squashing down the entire history (well, everything in master anyways) to a single (root) commit.
- AtlasBarfed 7y agoTemplates are a copy of a non empty word document Cloning is a word document with versions turned on that copied all the previous versioning information
- elygre 7y agoWouldn't clone keep the entire history of the original repo, while this gives a single initial commit?
- onion2k 7y ago'git clone --depth=1' will only clone the latest HEAD so you won't get the history.
- joshvm 7y agoWhen you fork a repository on Github, the website retains the association between the original and forked repos. But there are also artificial limitations e.g. Github forks can't be private when there's no technical reason that couldn't be the case. A forked repo is fundamentally just a clone with a different origin (i.e. changes get committed to a new place). What we think of as "forking" is the user experience that services like Github provide. If you clone a repository and then make a new project on Github with it, Github has no way of identifying that what you've done is technically a fork. It could obviously, but it doesn't. Templating is basically the same thing, but it's more like clone a repository, delete the .git folder, run git init, and then associate the repo with your account. Except this all happens transparently on Github's servers and what you end up with is a clean new project with an "initial commit". So in a sense whether you fork or template, you're still cloning a repo, but what happens after you clone is different in each case (and is also different from "just" cloning).