Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Alyson and Kyle demonstrate what a traditional workflow should look like within an organization.
In this video, we used
git branch --remote to get a list of all branches currently on the remote (or, said another way, on GitHub). We then used
git checkout followed by the name of the remote branch to download that branch locally. For example:
git checkout test_branch
You can read more about the git checkout command at the great Git SCM docs site.
If you’d like another visual example of what Alyson and Kyle did in this video, you can checkout the GitHub Flow documentation on the GitHub Guides site.
Because I'm on the developers team I got an email notification from Kyle. 0:00 Now, let me show you what reviewing an open pull request looks like. 0:04 It says, Adds a small message to the README, this PR adds a small explanation 0:08 about who is working on this repository and any at mentions the developers team. 0:13 That's me. 0:18 And I wanna take a look at the Files changed, and 0:19 I can see that there's just one line added. 0:22 Okay, I wanna pull these changes down to my local computer so 0:25 I can make a few edits. 0:28 So I'll go to the Code view and I'll copy this to my keyboard and 0:30 pull up my terminal. 0:36 I'll type git clone and paste in the URL. 0:37 I'll cd into the repository and 0:42 from here I'll type git branch. 0:47 This is weird. 0:52 There's only a master branch. 0:53 Why is that? 0:55 Where is the updated-readme branch? 0:56 This has gotten me mixed up plenty of times. 1:00 And when we do a git clone, we don't get the remote branch locally. 1:02 We need to check it out. 1:06 So I'll type git branch -- remote and 1:08 I can see the updated readme branch there. 1:12 So I'm gonna type "git" 1:18 checkout updated -readme. 1:22 Cool. 1:27 Branch updated readme set up to track remote branch. 1:29 Da da da. 1:32 Switched to a new branch updated README. 1:33 Now, I'm gonna open my text editor and make a few changes. 1:36 I'll just type 1:46 [BLANK AUDIO] and 1:50 we'll save. 1:56 Now, back in the terminal let's add, commit and push up our changes. 2:00 Clear that out, let's do a git status. 2:09 Modified readme, cool, and 2:15 we'll do a git add., 2:20 git commit-m "added team members", 2:24 one file change, cool. 2:30 And, I do a git push origin updated-readme. 2:35 Great, so if we go back to the website here and 2:47 click Refresh, and go to Pull requests, 2:53 we can see that my commit was pushed up and 2:58 added team members. 3:03 Great. 3:06 Last but not least, let's let Kyle know that I've reviewed this pull request 3:09 by giving a quick plus one. 3:13 And I'll click Comment. 3:25 Now, it's up to Kyle to merge the pull request. 3:27 >> Pull requests can have a few different methods of getting merged. 3:31 In some companies, a teammate always merges the pull requests. 3:34 This ensures that another set of eyes are on the pull request, and 3:38 it's always ready to go to production. 3:41 In other companies, the person who submitted the pull request will merge it. 3:43 In this case, I'm going to merge my own pull request. 3:47 Let's take a look at Allison's review. 3:50 She added a commit here. 3:53 Okay. 3:57 And she commented. 3:59 Great, all I need to do now is click the Merge button. 4:01 Now that we're done with this branch, we can safely delete it. 4:08 If we ever need it again, we can always click this Restore branch button. 4:12 Now let's take a look at the repository commits 4:17 by going back to the main repository page and clicking this commits link. 4:20 There, you can see our merge from the pull request. 4:25 In the next stage, we'll show you how you can use this workflow with your own site 4:28 and using GitHub Pages. 4:32
You need to sign up for Treehouse in order to download course files.Sign up