4

Can someone explain to me the different between a "Fork & Pull" workflow and a "Forking" workflow when using Git? it seems to me that that both involve creating your own repository, then using a pull request to ask the central repo to pick up your changes? I've read descriptions of both several times and it's just not clear to me how they are different from each other ultimately.

MikeBaz - MSFT
  • 2,938
  • 4
  • 28
  • 57
  • From a quick Google search, these two workflows sound like the same thing. This might be a case where both terms are used interchangeably by different teams. – Adil B Mar 19 '19 at 21:15
  • 1
    well, that's kind of where my confusion comes from I guess - but I'm reading training materials that say that a "Forking" workflow is very different from a normal GitHub workflow - and https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow says the same thing. But I don't understand how. – MikeBaz - MSFT Mar 19 '19 at 21:17
  • Comparing that `Forking` tutorial to a `Fork&Pull` one: https://gist.github.com/Chaser324/ce0505fbed06b947d962 they both list the same set of steps too – Adil B Mar 19 '19 at 21:29
  • You cite pages that say the "Forking" workflow is different than "normal" or "other" workflows. I don't see any sources that list "Forking" and "Fork and Pull" as distinct workflows. – ewindes Apr 17 '19 at 13:58
  • "The Forking Workflow is fundamentally different than other popular Git workflows" is from https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow as cited earlier. https://git.io/gitpr seems to imply that "Fork and Pull" is a popular workflow. – MikeBaz - MSFT Apr 17 '19 at 17:11
  • @MikeBaz-MSFT I don't get your point. "Fork" and "Fork and Pull" are the refering to the same workflow, just using slightly different terms. These workflows are not really standardized, there just some loose conventions. Some people invent their own workflow without giving any name. Would help to describe the "Fork & Pull" in an answer? – lumbric Apr 17 '19 at 21:01
  • My point is that the documentation at Atlassian implies they are different, as does other non-public training material that I'm looking at. Honestly this is all kind of a nightmare for someone trying to learn this stuff. Anyway, if they are literally the same, is there a place that says they are two terms for the same thing other than, well, these comments? – MikeBaz - MSFT Apr 17 '19 at 21:19
  • or, let me tackle it this way - if they really are the same, what are the other "popular Git workflows" Atlassian is referring to? because "Fork and Pull" seems to be what every open source project seems to use? – MikeBaz - MSFT Apr 17 '19 at 21:20
  • Well besides the `centralized workflow` (central repo where every dev can push to (which can lead to problems)) there is of course the `forking workflow` which is the same as the `fork & pull workflow`. But not everyone uses the `forking workflow`. Another common workflow would be the `Gitflow workflow` this is particularly suitable for projects that only want to have official versions (or have some kind of release-cycle) on their master branch. **Edit:** I found a good article https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow – Aaron3219 Apr 18 '19 at 11:54
  • ok, those other workflows match some of the other stuff I'm reading so that tracks. I guess I'm going to have to approach the authors of the material that's listing them as two different things and find out what they are thinking, if I have some way to do that. – MikeBaz - MSFT Apr 18 '19 at 13:20
  • Just curious... 1. For the materials you posted from Atlassian (who runs Bitbucket), they all describe things about **git** and I didn't find any existence of **GitHub**, so why do you refer to GitHub on the question title? 2. why the h\*\*l are there such "tutorials" and namings?... – renyuneyun Apr 18 '19 at 13:28
  • re: github, that's a legit callout, probably not right to have it there. I'll fix it. re: tutorials and namings, not sure I understand the question. – MikeBaz - MSFT Apr 18 '19 at 13:34

1 Answers1

0

From "Atlassian: Forking Workflow"

The Forking Workflow is fundamentally different than other popular Git workflows.

If actually is the pull request model (initiated by GitHub and their fork): each developer pushes to their own fork repo, and make a pull request from the fork repo to the main repo, where the maintainer can pick and choose what to integrate.

That differs from a classic Git workflow where all developers are pushing to the same remote repo, but in different branches, and with different merge workflow (like gitworkflow).

So:

is the described workflow the same as what others call "Fork and Pull"?

No: this is another name for the GitHub model, where you fork a repo, pull from that fork, creates a new branch that you push back (to your fork), and make a pull request.

GitHub contrasts that with the shared repository model, where collaborators are granted push access to a single shared repository and topic branches are created when changes need to be made.

Pull requests are useful in this model as they initiate code review and general discussion about a set of changes before the changes are merged into the main development branch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I referenced that post in the comments, so I knew about that. But then that still leaves the question, is the described workflow the same as what others call "Fork and Pull"? – MikeBaz - MSFT Apr 18 '19 at 17:03
  • @MikeBaz-MSFT No, it is just another name for the "Fork and Pull": I have edited the answer with the GitHub documentation illustrating that. – VonC Apr 18 '19 at 21:39