Effective PyCharm Transcripts
Chapter: Source control
Lecture: Concept: PyCharm git flow and PRs

Login or purchase this course to watch this video and the rest of the course contents.
0:02 We've seen that we can actually follow the git flow from within PyCharm. And what you have to do to make this happen
0:10 is you actually have to go into the tools task section and configure the server. This is not really obvious at all,
0:17 so you have to come down here and you have to say configure servers and unless you hit this plus, you're like what is this for anyway, task servers?
0:23 But you can see this is actually four issue tracking and at the very bottom, we have github. So github is obviously where I like to do my work
0:32 but wherever your company works— maybe you use YouTrack, maybe you use Jira, who knows.
0:37 We configure that, and we put the host name, the host is github.com we put your username, put your repository name, and then you put your api token,
0:48 remember this is sensitive, don't share that with anyone. So you can determine whether or not you want to see issues not assigned to you,
0:55 you probably do, take your pick. I guess it depends how many issues you have. So, you can say that, show me the issues not assigned to me,
1:04 and then, once you do that, this little default task thing appears next to the source control, that wasn't there before.
1:12 Now, once we have this, we can click on it and pull the drop down and say open task and it will give us this thing to search and whatnot,
1:23 but what is really cool is all of our github issues, and our github repo show up here, and notice, to the left of the Python jumpstart 29 test issue
1:31 there is a little github icon, little octocat thing. So we click on that, and it says okay, great, we're going to open this task,
1:39 however you are going to basically configure your work space for it, so you can click your context, we can create a new branch,
1:48 remember, in here I use my username/ the id of issue I am working on- some short description so that it's pretty easy to tell
1:58 like here is a feature branch for this issue, I based it on master, that seemed like it made a lot of sense, and creating a change list for git—
2:06 I don't know if that's required, depending on how you're working, I don't use change lists that much, but if that's helpful to you, go for it.
2:13 Then, you do all your work, and when you're done, you come over here tool stats and say
2:19 close active task and that will basically close it off and commit it and so on. So, come over here, say close active task,
2:26 you can commit the changes, we can merge the branch, we can update the issue resolved, and check it in, and that will do the commit and push, all that.
2:34 Now, if you're working in github, and you're doing the git flow stuff, I would recommend that you commit the changes— yes,
2:42 merge branches— no, update issue— no. Instead, what you do after this is you go to the github repo right at the top,
2:51 it should say there has been a new check in in another branch, would you like to do a pr, create a pr?
2:57 Click yes, and take the rest of the flow through the github itself, but if your source control area, if you are just using straight git or something,
3:06 doesn't support git flow and pull request, go ahead and do the rest right here.


Talk Python's Mastodon Michael Kennedy's Mastodon