1
00:00:09,530 --> 00:00:10,730
In this video.

2
00:00:10,760 --> 00:00:17,630
Let's talk about another important concept when it comes to gifts, and that is branches.

3
00:00:17,870 --> 00:00:21,320
What is it and why should we care about it?

4
00:00:21,500 --> 00:00:26,990
Well, a branch is a pointer to a snapshot of your changes.

5
00:00:26,990 --> 00:00:28,370
So what does that mean?

6
00:00:28,610 --> 00:00:36,140
Let's say a key that we are working with a team or we are working alone by building an application.

7
00:00:36,530 --> 00:00:44,720
In that way, you need to have a branch, meaning that a branch represents a specific portion of your

8
00:00:44,720 --> 00:00:45,710
application.

9
00:00:45,950 --> 00:00:52,160
Let's say that you have a branch for fixing back and then a branch for adding new features.

10
00:00:52,190 --> 00:00:54,170
Let me show you with this diagram.

11
00:00:54,200 --> 00:00:59,690
Let's say that we are about to develop a web application for a client.

12
00:00:59,930 --> 00:01:07,640
Before we start, we need to initialize our projects as gate so that we can keep track about the version.

13
00:01:07,730 --> 00:01:13,880
So you're going to have your main branch because as soon as you initialize gate, you're going to have

14
00:01:13,880 --> 00:01:15,260
your main branch.

15
00:01:15,260 --> 00:01:19,520
And this is a branch that you are going to push your code to.

16
00:01:19,670 --> 00:01:24,500
So let's say that we have finished deploy our application, that is for version one.

17
00:01:24,560 --> 00:01:26,090
It is in production.

18
00:01:26,210 --> 00:01:33,860
So any time we make changes to our code, meaning that is going to update the main one.

19
00:01:34,040 --> 00:01:40,280
And that's the key that for that update, it contains some bugs, but as soon as we update, it's going

20
00:01:40,280 --> 00:01:46,610
to affect the final one, meaning the end user going to have some difficulties accessing it.

21
00:01:47,370 --> 00:01:47,970
Again.

22
00:01:47,970 --> 00:01:53,790
Let's take it that we are working with a team, meaning that all the team members, they are going to

23
00:01:53,790 --> 00:01:58,210
contribute to the final project that is in the main branch.

24
00:01:58,230 --> 00:02:00,850
So how are we going to handle that?

25
00:02:00,870 --> 00:02:05,110
So to achieve that, we call something branches.

26
00:02:05,130 --> 00:02:10,470
So before we start, we need to create a branch for that application.

27
00:02:10,650 --> 00:02:15,370
The first branch that we can create is called fixing error.

28
00:02:15,390 --> 00:02:22,680
So this branch is going to contain all the errors that you might encounter, which has been fixed.

29
00:02:22,920 --> 00:02:30,480
The next branch that we can create is called features, and this one contains any upcoming features

30
00:02:30,480 --> 00:02:33,330
of our project that we want to publish.

31
00:02:33,570 --> 00:02:39,480
So let's say that for the first part, we are working towards fixing that error.

32
00:02:39,510 --> 00:02:46,350
So all the code will be inside this branch without affecting the final one.

33
00:02:46,530 --> 00:02:53,150
So after we finish fixing it, then we can push to the final one, call the main branch.

34
00:02:53,160 --> 00:02:57,690
So at this point, the end user is going to see the final result.

35
00:02:58,050 --> 00:03:04,830
Then if you want to add new feature, definitely we are going to add the future to the features branch.

36
00:03:05,040 --> 00:03:12,150
So after we test and everything is okay, then we push it to the main branch and let's take it that

37
00:03:12,150 --> 00:03:14,370
we are also working in a team.

38
00:03:14,370 --> 00:03:21,390
So you're going to have the main branch and then irrespective of the developers is going to work towards

39
00:03:21,390 --> 00:03:24,950
this branches without affecting the main branch.

40
00:03:24,960 --> 00:03:31,730
So after all the code has been finalized, then you can go ahead and then push it to the main branch.

41
00:03:31,740 --> 00:03:36,660
So before you begin developing your application, you need to have this roadmap.

