RSE-Sheffield / git-github-zero-to-hero

Training materials for zero to hero training in version control through git, github and gitkraken
https://srse-git-github-zero2hero.netlify.app/
17 stars 10 forks source link

Explaining Forking vs Branching #64

Open EdwinB12 opened 2 years ago

EdwinB12 commented 2 years ago

Do we think it would be useful to spell out the different circumstances of when to fork vs branch? We saw this confusion in the previous class when someone started section 4 and simply went ahead with forking the project (supposedly because that's what is done in section 3). I would argue this is simply good info to have and it confused me when I was starting out.

I would suggest something like:

  1. Small slide explaining that forking is useful when you're not a collaborator on a project but want to add some feedback via a PR or simply want to mess about!.
  2. Quick demonstration of how you can't go into a open repository and start branching from it.

Probably best inserted at the beginning of section 4.

Do we think any of this is necessary in a course already packed with information?

EdwinB12 commented 1 year ago

A person can only make a branch in a repositoy if they are a team member. Therefore, branching is used internally for teams to collaborate. This is what we're doing today.

However, maybe you would like to contribute to an open piece of software where you're not a team member or not part of the organisation. This is where forking is useful. Forking makes a copy of the open source repository on github. This can then be edited and messed around with as much as possible before making a pull request back to the original open source repository. It is then up to the owners of the open source repository to accdept or decline your pull request. This is what we did yesterday.

This is something I wrote in todays class. This kinda thing :)