1 00:00:00,300 --> 00:00:03,320 I'd like to create a personal website using GitHub pages, and 2 00:00:03,320 --> 00:00:07,660 I'm using the end project from the Treehouse Intro to HTML and CSS course. 3 00:00:07,660 --> 00:00:09,959 To start, we'll head to github.com and create a new repo. 4 00:00:16,530 --> 00:00:19,410 We'll name our repository our username, .github.io. 5 00:00:19,410 --> 00:00:22,440 It has to be this exactly or it won't work. 6 00:00:27,770 --> 00:00:29,520 We'll add a short description. 7 00:00:34,140 --> 00:00:35,790 We'll keep it public. 8 00:00:35,790 --> 00:00:39,870 We won't initialize it with a README, and we'll click Create Repository. 9 00:00:41,210 --> 00:00:42,850 Just so you know, for GitHub pages, 10 00:00:42,850 --> 00:00:47,450 even if your repository encode is private, the hosted website will always be public. 11 00:00:47,450 --> 00:00:49,280 Now, if I navigate to my terminal, 12 00:00:49,280 --> 00:00:52,515 I'll change directories into the folder where my project is. 13 00:00:53,853 --> 00:00:59,006 And if I ls, I can see there's an index.html file, 14 00:00:59,006 --> 00:01:03,000 styles.css file, and an images file. 15 00:01:04,120 --> 00:01:06,660 GitHub pages only work for front end websites, so 16 00:01:06,660 --> 00:01:10,770 you wouldn't be able to host a Ruby on Rails or Python app, for example. 17 00:01:10,770 --> 00:01:14,820 Also, you'll need your main page to be named index.html. 18 00:01:14,820 --> 00:01:17,755 Now, we'll run the commands we've been using to initialize the git repository and 19 00:01:17,755 --> 00:01:18,430 check the status. 20 00:01:22,610 --> 00:01:24,000 And initialize empty git repository. 21 00:01:27,880 --> 00:01:34,324 Looks like we're on branch master, we've got these untracked files, 22 00:01:34,324 --> 00:01:38,866 cool, so we'll do git add., to add everything, 23 00:01:38,866 --> 00:01:42,794 git commit- m, initial commit to commit. 24 00:01:42,794 --> 00:01:45,710 Great, and now we'll add the remote. 25 00:01:48,450 --> 00:01:51,900 And we'll git push origin master. 26 00:01:54,750 --> 00:01:59,113 Now if we go back to GitHub and we click Refresh, 27 00:01:59,113 --> 00:02:04,565 we can see all of our files are there, and if I open a new tab, 28 00:02:04,565 --> 00:02:09,692 and go to realalysonla, my user name, .github.io, 29 00:02:09,692 --> 00:02:15,530 I can see my brand new portfolio site is ready to share. 30 00:02:15,530 --> 00:02:17,605 If you don't see it right away, that's also normal. 31 00:02:17,605 --> 00:02:20,360 Page's sites can sometimes take a few minutes to build. 32 00:02:20,360 --> 00:02:23,530 If I make any additional changes, I can simply add, commit, and 33 00:02:23,530 --> 00:02:26,975 push them up to the master branch, and my website will be automatically updated.