1
00:00:01,760 --> 00:00:04,760
Hi, and welcome to today's programming Tool.

2
00:00:04,880 --> 00:00:09,710
Today, I'm very excited to introduce you to a new skill.

3
00:00:11,020 --> 00:00:14,320
This is a must have skill for any programmer.

4
00:00:14,380 --> 00:00:16,270
And this skill is.

5
00:00:17,980 --> 00:00:23,560
The skill of controlling the versions of your programs, in other words.

6
00:00:24,640 --> 00:00:25,980
Version control.

7
00:00:25,990 --> 00:00:28,840
So version control is a practice.

8
00:00:30,100 --> 00:00:34,030
That allows you to track changes in your code.

9
00:00:35,080 --> 00:00:36,880
And manage those changes.

10
00:00:36,880 --> 00:00:40,600
So let me explain what I'm talking about with an example.

11
00:00:44,290 --> 00:00:47,170
This is the state of our code at the moment.

12
00:00:47,170 --> 00:00:51,130
But let's suppose that we have an issue with the added.

13
00:00:52,140 --> 00:00:52,950
Keys.

14
00:00:53,880 --> 00:00:55,380
We realize that.

15
00:00:56,330 --> 00:00:59,690
About five days ago, we made a change which.

16
00:01:00,960 --> 00:01:03,450
Cause the issue we have now.

17
00:01:03,450 --> 00:01:06,240
So what we want to do is we want to go back.

18
00:01:07,360 --> 00:01:10,900
To the state of the code as it was five days ago.

19
00:01:14,060 --> 00:01:16,970
You cannot do that with undue.

20
00:01:17,870 --> 00:01:20,420
Because you have saved the codes already.

21
00:01:20,420 --> 00:01:21,940
You have close by charm.

22
00:01:21,950 --> 00:01:23,420
You have reopen it again.

23
00:01:24,920 --> 00:01:27,890
So undoing the changes is not an option.

24
00:01:28,340 --> 00:01:30,670
All you're left with is your memory.

25
00:01:30,680 --> 00:01:31,370
You try.

26
00:01:31,410 --> 00:01:39,860
You'll try to remember what you did change back then, and then try to rewrite the code as it was.

27
00:01:41,730 --> 00:01:43,650
And that's not the best solution.

28
00:01:43,740 --> 00:01:47,520
That's why we have version control systems.

29
00:01:48,180 --> 00:01:51,870
So we have version control and version control systems.

30
00:01:51,990 --> 00:01:57,630
Version control systems are software which we will install on our computer.

31
00:01:57,630 --> 00:01:59,760
You will install it on your computer as well.

32
00:01:59,820 --> 00:02:07,260
And that system allows you to control the versions of your programs, of your Python programs.

33
00:02:09,680 --> 00:02:15,170
Practically in this case, if we had used a version control system.

34
00:02:16,430 --> 00:02:20,930
With our project here, we would be able to easily go back.

35
00:02:21,600 --> 00:02:28,140
And see the code as it was five days ago, and then we can reuse that version of the code.

36
00:02:30,000 --> 00:02:34,650
Or just pull up certain changes from that code.

37
00:02:35,310 --> 00:02:43,950
We can compare that code with our code as so we have control over the versions of our programs.

38
00:02:46,630 --> 00:02:53,110
So as I mentioned, to control the version of your program, you need to use a version control system,

39
00:02:53,110 --> 00:02:55,660
which is a software you install.

40
00:02:56,110 --> 00:03:03,490
So now I'll mention the main version, control systems which can be used and we'll have to pick one

41
00:03:03,490 --> 00:03:04,060
of them.

42
00:03:06,040 --> 00:03:07,510
The first one is good.

43
00:03:09,540 --> 00:03:14,850
And Git is also the most popular version control system, and that's the one we will use.

44
00:03:15,060 --> 00:03:18,850
But just for knowledge, I'll also mention the other systems as well.

45
00:03:18,870 --> 00:03:27,540
We have Apache Subversion Bazaar and Mercurial to mention just a few of them.

46
00:03:29,480 --> 00:03:36,440
Of course, there are slight changes between those are, but the most popular one and the best one is

47
00:03:36,440 --> 00:03:37,700
also get.

48
00:03:37,700 --> 00:03:41,570
So we'll be using it and I will.

49
00:03:42,510 --> 00:03:45,440
Take you through using it in the next day.

50
00:03:45,460 --> 00:03:48,090
So tomorrow in the programming tool of tomorrow.

51
00:03:48,570 --> 00:03:55,230
Today I just want to make you familiar to to make you understand what version control is.

52
00:03:58,370 --> 00:04:04,820
So tomorrow we will install gates and we will connect it with our projects so that we can keep track

53
00:04:04,820 --> 00:04:08,900
of our changes, so we can control the version.

54
00:04:09,110 --> 00:04:18,620
But before we go to tomorrow's video, I want to show you a glimpse of a version control.

55
00:04:20,160 --> 00:04:22,830
So this is one of my personal projects.

56
00:04:23,460 --> 00:04:24,600
This is a.

57
00:04:25,240 --> 00:04:27,940
Project, a Python based project.

58
00:04:29,060 --> 00:04:34,010
Which constructs a web app, and it's based in the Django framework.

59
00:04:34,730 --> 00:04:38,540
So this is the Python code base and.

60
00:04:42,960 --> 00:04:49,710
If you go to this button here, of course you don't have this because you have not enabled get yet.

61
00:04:49,710 --> 00:04:51,900
But I have enabled kids in this project.

62
00:04:51,900 --> 00:04:59,430
So if I go to that button, I'll have access to all the changes I have made across.

63
00:05:00,450 --> 00:05:01,660
Different days.

64
00:05:01,680 --> 00:05:09,840
So, for example, if I want to see how my code was at this change here, when I added an exercise and

65
00:05:09,840 --> 00:05:11,700
I recorded that change in here.

66
00:05:11,790 --> 00:05:18,300
So I can just right click here and then I can compare that file with the local file.

67
00:05:18,300 --> 00:05:21,840
So then I'll I'll see here.

68
00:05:23,040 --> 00:05:25,440
The file as it was back then.

69
00:05:25,540 --> 00:05:32,160
And then here on the right, I have the current view of the file, how the file is now and how the file

70
00:05:32,160 --> 00:05:34,650
was back then when I made that change.

71
00:05:40,970 --> 00:05:43,610
Lots of changes are highlighted, as you can see here.

72
00:05:45,290 --> 00:05:46,220
And so on.

73
00:05:47,740 --> 00:05:50,660
So I have recorded different changes in here.

74
00:05:50,680 --> 00:05:57,430
I can click any of them and here on the right I can see the files that were changed that day.

75
00:05:59,750 --> 00:06:00,260
And so on.

76
00:06:00,260 --> 00:06:01,010
So that's.

77
00:06:01,940 --> 00:06:04,100
How it works in a nutshell.

78
00:06:04,850 --> 00:06:11,450
I'll take you through how to make these changes, how to record the changes, how to see the changes.

79
00:06:11,450 --> 00:06:12,870
So don't worry about that.

80
00:06:12,890 --> 00:06:14,300
This was just to show you.

81
00:06:15,320 --> 00:06:16,970
Get in a nutshell.

82
00:06:17,950 --> 00:06:23,560
Now this was get the software we installed to help us.

83
00:06:24,630 --> 00:06:27,780
See these changes in our program.

84
00:06:27,780 --> 00:06:29,910
But there's also get hope.

85
00:06:30,420 --> 00:06:31,710
Maybe you have heard of it.

86
00:06:32,310 --> 00:06:44,430
GitHub is a software hosting platform, so all these folders that you see here and all the files inside

87
00:06:44,430 --> 00:06:48,940
them, for example, views that P inside blog.

88
00:06:48,960 --> 00:06:53,070
This file is also in here in my project here.

89
00:06:54,440 --> 00:06:55,430
Python home.

90
00:06:57,730 --> 00:06:58,920
So that is the file.

91
00:06:58,930 --> 00:07:03,640
So all these files are uploaded to GitHub.

92
00:07:04,600 --> 00:07:08,860
So why would you want to upload your your program files to GitHub?

93
00:07:08,890 --> 00:07:10,990
Well, that's for several reasons.

94
00:07:11,590 --> 00:07:16,750
First, you can use GitHub as a backup system, so it's cloud based.

95
00:07:16,870 --> 00:07:21,490
If you lose access to your files, to your hard drive.

96
00:07:23,310 --> 00:07:30,420
You lose your computer, etc. Then you have the files on GitHub and I'll show you how to synchronize

97
00:07:30,420 --> 00:07:31,200
your files.

98
00:07:31,920 --> 00:07:36,630
So they are always up to date with the GitHub platform.

99
00:07:37,020 --> 00:07:39,540
So backups is one reason.

100
00:07:39,840 --> 00:07:44,490
Other reasons are you may want to share your code with other people.

101
00:07:46,270 --> 00:07:54,430
So you may want to create a portfolio for potential employers to see your codes or clients.

102
00:07:55,000 --> 00:07:57,160
And GetUp!

103
00:07:57,190 --> 00:08:02,560
Can also be used when you want someone to collaborate with your projects.

104
00:08:03,940 --> 00:08:11,380
So both you and your collaborator can make changes on your own computers and you can upload to the changes

105
00:08:11,590 --> 00:08:13,630
to GitHub and.

106
00:08:14,710 --> 00:08:23,020
Everything there is tracked, so everything is synchronized with the changes you have on Git.

107
00:08:23,020 --> 00:08:25,960
So Git and GitHub are synchronized with each other.

108
00:08:25,990 --> 00:08:33,490
Git is local and github is cloud based to back up your code and to be able to share your code with other

109
00:08:33,490 --> 00:08:34,150
people.

110
00:08:35,390 --> 00:08:41,059
Another rule of GitHub is that, for example, in my case.

111
00:08:44,280 --> 00:08:49,200
It allows me to upload the code to the web server.

112
00:08:49,200 --> 00:08:53,490
So that's the product of that code that you see here.

113
00:08:54,120 --> 00:09:02,520
So this is a web app I've built in Python, and this web app has to be run in some remote servers.

114
00:09:03,060 --> 00:09:13,980
So that means I have to upload all this code to that remote server and GitHub serves as an intermediary.

115
00:09:14,160 --> 00:09:20,190
So I upload my code to GitHub and then I get the code from GitHub to the server.

116
00:09:24,120 --> 00:09:30,560
And so that was the lecture own version, control version, control systems, Git and GitHub.

117
00:09:30,570 --> 00:09:40,110
So as a summary version, control is the practice of recording the changes you do on your programs.

118
00:09:40,110 --> 00:09:47,520
And the way to record your changes is to install a software which I'll cover later.

119
00:09:47,640 --> 00:09:51,690
So the software itself is the version control system.

120
00:09:53,200 --> 00:09:59,170
Then you have extras, which is this cloud based software hosting solution.

121
00:09:59,350 --> 00:10:07,030
So such as GitHub where you can upload your code to have a backup and it also allows you to share your

122
00:10:07,030 --> 00:10:08,140
code with others.

123
00:10:10,270 --> 00:10:11,650
And that's about this video.

124
00:10:12,850 --> 00:10:19,740
Tomorrow I'll take you through installing and using good step by step so you can use it on your computer.

125
00:10:19,750 --> 00:10:20,950
So I'll see you tomorrow.

126
00:10:20,950 --> 00:10:21,100
See?

