-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branches vs clones vs forks #1
Comments
...which readme? You didn't link to anything. Mine? or yours? https://github.com/Jonta/Taran-should-trash-this#readme After lots of clicking, I realized that clicking the UPPER "readme.md" yields a different result from clicking the LOWER "readme.md" https://github.com/Jonta/Taran-should-trash-this/blob/main/README.md Github isn't guiding me through anything. I'm not sure what you want me to do...? I'm also not sure if that image actually will be visible for you. Anyway, you can use my full name if you like, I don't mind either way. |
It's fun watching @TaranVH learn GitHub 😂 |
@TaranVH the lower readme is actually a relatively new functionality for having a "table of content" of a markdown file, it's exactly the same as in MS Word when you're using different heading @Jonta not sure what this is but popped into my feeds and since @TaranVH's videos helped me a lot, I'm always in for helping him XD |
@TaranVH The issue report is in this repository ("repo"), so I'm referring to the readme.md belonging to this repo I can see both images you posted. In the 2nd one, the text in the blue box is what I'm referring to as guiding you through the process Having your entire name is just an example of a modification. The goal is for you to make a change to someone else's repo, and turn that into a pull request, and then for me to merge that pull request into this project. =) |
https://github.com/firstcontributions/first-contributions |
yyyyyyyeah that "guide" gives the steps, but doesn't explain what any of them actually DO. What exactly does it mean to "fork" a repository? What if I clone without forking? Does cloning require that it be forked first? This tutorial https://github.com/firstcontributions/first-contributions/blob/master/gui-tool-tutorials/github-desktop-tutorial.md says "DO NOT CLONE THE ORIGINAL REPO" ... gosh! Sounds important. Too bad they don't explain why! And if it's so bad, why is it even an option?? Sure, let's just have a "ruin everything" button and tell people not to press it. That's good design. And then, wait, I have to make a BRANCH?? What the hell is a branch?? Why do I need that? Thanks, programming tutorials, for technically explaining everything, but effectively explaining nothing. This is on par. |
Clone means to download a repository onto your local computer. Forking means to make a copy of another person's code repository. You would do this because you do not have access to that person's original repository, but you have access to your fork. The reason why you would want to fork then clone is because when you make changes to a project you wouldnt be able to push them to the main repository, but only your fork. This diagram and website may help explain what branches are: Branches are created to avoid multiple people working on the same files at the same time and overwriting each other. |
I still do not understand at all. |
Branch: You want to experiment with a new feature, and you know it'll take some time. You want to be able to commit things to it, and push things, but not bother the main branch with it. It's a skunkworks thing, off in its own building. You can still fetch updates from main-branch into the one you're working on though. Here are the branches in this repo: https://github.com/Jonta/Taran-should-trash-this/branches Clone: Your local copy of the repo. Fork: GitHub making collaboration easier. They clone the original repo, and now you have your own, and they keep a connection to the old one. In your fork https://github.com/TaranVH/Taran-should-trash-this which you made to create that change and then that pull request, it says "forked from Jonta/Taran-should-trash-this" and "This branch is 2 commits behind Jonta:main" Confusion for newcomers: People who are already here, using the wrong terms for things |
It's cool that a branch can keep taking stuff from the.... is it really called the "main branch"? why not call it a "trunk"? oh well. |
ForksI will take a leap, and it will not be perfectly ok from a developer's point of view, but I hope it will clear up things. BranchesWithin the same project maybe I would like to do changes, but a lot of people may be working on the same files simultaneously. in shortI think another way to explain the difference (at least on github) is: |
tl;dr you can call it as you want, in some versioning systems actually I think they were calling it trunk. It's just a convention, in the past you had a edit: I remembered correctly, in SVN actually it's called trunk |
"LibreOffice for example is a fork of Openoffice" But those things CANNOT be smushed(merged) back together again. Right? So, a fork MIGHT be merge-able, but if it changes too much, it'll become incompatible with the main branch, meaning it can no longer be merged. riiiiiiiiight? And once it stops being compatible with the main branch, it's still a fork, but it is NO LONGER a branch...... yes? no? If not, exactly what is the terminology used for that? |
According to Wikipedia: Yes - https://en.m.wikipedia.org/wiki/Bitcoin_Cash
Incorrect. They can be merged again. Bitcoin is a special case, because merging that one with one of its forks would have large implications for peoples' finances But you can merge "any" two pieces of software. Premiere and Notepad, Firefox and Minecraft, iOS and Android
When you use the term "too much" it becomes a tautology. https://en.m.wikipedia.org/wiki/Tautology_(language) "If you change the fork so much that it becomes incompatible with the original, it is incompatible with the original". To the Obviousmobile. "Incompatible": What dat mean? For some, it might be something as small as American vs British spelling. Is your video editing style incompatible with that of iJustine? To some it is. To others, not. The more different the fork is, the more likely that it's Incompatible™. Different could be "How much code do they share?" If your question is actually closer to "cannot be smushed together by a dumb computer without problems occurring": Yes. In that way, they can become incompatible quite quickly. Especially if you use a very dumb computer program to smush.
Branch: Can be Incompatible™ with the main branch. See American vs British spelling. You see that French translation branch I started yesterday? I could remove all content from it. And replace that with the latest Linux kernel. It would still be in that French translation branch. Not super useful, just like merging Firefox and Minecraft, but definitely something one could do.
"Folder" becomes inadequate here. It's what you tell your uncle, who doesn't have to use But if I want to work with you, I'll need the details "editor" and "cinematographer" Edit: Branch vs fork: Intent Branch: "I want to make a new feature, that will hopefully become part of the main branch when I'm done making it" |
well. |
Each node in the diagram is a "commit" or a collection of changes of files, kind of like a save command. The lines are branches, there are 3 in the diagram. The diagram does not show the merging but yes ideally you would want to merge these changes. The above definitions of forks are from a consumer perspective with regards to projects but from a git/versioning perspective, yes, a fork is just another branch of the code. The difference is the fork belongs to another person. The person with the fork can then choose to request the original project owner to pull (Pull Request/PR) their changes back to the original project. This is essentially a process of merging branches which can happen to branches within the same project, or with branches across forks. |
@TaranVH: Submit a pull request, expressing your opinion on this. =)
Click the edit-pen on the readme, and GitHub will guide you through the next steps
The text was updated successfully, but these errors were encountered: