Mastering PyCharm Transcripts
Chapter: Source control
Lecture: git flow and PRs

Login or purchase this course to watch this video and the rest of the course contents.
0:01 One of the more advanced workflows in github or git in general
0:05 but really github, is this thing called git flow.
0:09 So the idea is we're going to go and create an issue,
0:12 we're going to create a branch, a feature branch for that issue,
0:16 we're going to do all our work in that feature branch,
0:18 and then we're going to create a pull request
0:22 from that feature branch back to the target branch,
0:26 master or q&a whatever we're going towards;
0:29 wait until somebody approves that, merges that in
0:32 and then we'll close that corresponding issue.
0:37 So here is a fake git flow,
0:39 we've already created branch called python-jumpstart-course-demos-29
0:44 because this corresponds to issue 29,
0:46 not a great name but that's what it is,
0:48 I definitely recommend putting the issue id as part of this.
0:51 So, we've created this and we've made some changes,
0:55 we've checked it in there
0:57 and then we can click on create a pull request
0:59 as part of that statement we can say this fixes issue 29,
1:05 which then associates a link in github
1:08 between this pull request and this branch
1:11 back to that particular issue it is supposed to fix,
1:14 you can see there's no conflict, so we should be able to merge it—
1:17 we do, the pull request successfully merged and closed the pr,
1:21 if we want, we could delete the branch or leave it, take your pick.
1:25 Then finally, we can go over and we can close the issue 29
1:29 that was associated with it, so that's really, really great.
1:34 You can see below, mikeckennedy referenced this issue 11 seconds ago,
1:38 that's because I put hash 29 in the pr description.
1:41 This is a very common workflow, common in open source,
1:45 it's common even within companies
1:47 as a way to partition feature development within a team
1:51 so maybe somebody is working on a feature or a bug
1:54 and then they issue a pr basically back to themselves
1:57 or to their team members to keep going.
1:59 So let's see how this works in PyCharm.