7 ms·
> I don't plan to add network functionality to this (even though you totally can), so no clone or push. You can also git clone from a repository in a different
by sampo 3y ago
> I don't plan to add network functionality to this (even though you totally can), so no clone or push.
You can also git clone from a repository in a different directory in the same computer. And push to.
- Am4TIfIsER0ppos 3y ago[flagged]
- ambigious7777 3y agoThis is incorrect. First of all, GitHub is a service built upon Git. There is no requirement that you need to use GitHub. And there are other options, what you call "hubs", such as GitLab or SourceHut. Git as a VCS, has the feature to sync with other repositories elsewhere. These can be somewhere else on your computer, someone else's computer, or a server. GitHub happens to be one of those servers. ---- edit: if this was sarcasm, mb
- coolgoose 3y agoSomebody's sarcasm meter is off :-)
- eikenberry 3y agoThey were probably just being a generous reader and assumed the writer wanted to take part in the conversation, not just make fun of it.
- macintux 3y agoWeak snark is something I’m happy to downvote here at every occasion.
- Am4TIfIsER0ppos 3y agoNot my precious internet points! Whatever will I do now?
- d-lisp 3y agoExactly, but having branches kind of allow you to not have to create local clones. And I legit use rsync to clone locally git repos. The question is : what is the best ?
- nerdponx 3y agoYou can have multiple worktrees per repo. Usually that's the best solution instead of local clones.
- kilroy123 3y agoThis is what I do for complex projects.
- d-lisp 3y agoThat's interesting, some kind of meta branches.
- kazinator 3y agoThe git-worktree man page says: BUGS Multiple checkout in general is still experimental, and the support for submodules is incomplete. It is NOT recommended to make multiple checkouts of a superproject. Source: https://git-scm.com/docs/git-worktree https://git-scm.com/docs/git-worktree It complicates git with more cruft. A separate clone is more understandable and independent. If you trash something in its .git/ subdirectory, only that repo is affected.
- nerdponx 3y agoI'd hardly call it "cruft". Git has a lot of features. Not all of them are useful for all combinations of projects, workflows, and people. In my use case, independence would be an anti-feature. git-worktree fulfills a specific desire that I cannot fulfill with any known alternative. Therefore I use it. As for actual bugs, I certainly never encountered any. But I also don't use it with repos that contain submodules, as per the warning.
- more-coffee 3y agoThat is so obvious.. yet I've never thought to try this in 10 years of using git.