How to create git branch in Intellij Idea | git branch | git checkout

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to my channel i am razni khan and today's video i'm gonna discuss uh what is gate branch and how will create a green gate branch and how will switch different branches in intellij idea right so this is a continuation of intelligent idea with git series so we have covered lot of a lot of topics and this is my channel if you see uh here a lot of videos are there crowd operation and uh jay units mokito end-to-end uh crud application whatnot you can explore those uh videos as well right so let's explore today's topic git brands okay so uh let's see so this is that intellij idea this is a ide and let's see how we'll create branches and switch to different branches in intellij idea okay so already i have explained uh the how to create brands and switch different branches in command git command line and already those videos already have uploaded and i will give those links in the description section you can watch those videos as well right okay so what exactly git brands so get brands is a newer version of existing repository okay so if you want to if you want to do some experiment or if you want to do uh some experimental changes instead of directly modifying to that existing repository or existing repositories main branch you can create a branch from that repository and you can apply your changes once you have satisfied with those changes you can merge your changes to that existing branch right so for example if you see if you see over here master branch is there right so master is that main branch right which we should not touch master is the main branch and from master here one branch we have created if you see left hand side it's a difference right this is the development branch we have created from this day we have created feature feature one feature two feature three right so once we have done this feature one we can merge those changes to dev once we have done with feature two we can merge those changes to def right exactly like this we can create different branches and we can apply uh we can develop our changes in that of in those feature branches and we can merge those changes to our dev brands okay so this is the branching and deployment strategy maybe i can explain it some later point of time uh yeah okay so let's explore in the intelligent idea how will create branches right so this is the intellij idea and if you see here this is a version control tab is here right if you are not able to see this version control tab simple sorts here in the search button version control v e r s i when version control and click pretty simple you can see version control okay so completely right hand side at the ads if you see gate master so here is saying that we are point currently we are pointing to master brands okay so let's see how we'll create a branch so just click this master on this master just click it will pop out a like this a pop-up click here new branch okay so in that new branch pop-up if you see new branch name so what is that branch name you want you can give that name so currently from which branch it will create whatever the branch you will be so currently we are in master so from that master this branch will gonna create for example let's take let's take that name as a dev then this will create a dev branch from master okay good now now you can see here now you can see here one check box is there right check out branch what exactly this one so this indicates that create the difference from master and switch the branch from master to development so currently we are in master so create a development branch from master and switch switch the branch to development currently in master right so it will create the development branch and it will switch from master to development okay let's click ok and we're gonna see the c right hand side git dev so it created the branch table and branch from master and it switched to dev okay now if you will click this dev it will show you all those branches just see dev and master two branches are present okay now let's again create another branch so so i am creating from dev okay okay let's switch to master so huh so how i'll switch to another branch currently we are in dev right so how will switch to another branch click over here and click the branch you want to switch click master if you click master just see here one option is there checkout okay simply click this checkout okay now now we can see currently we are in master so it switched from development to master branch okay let's create another branch right so let me create some brands for qa suppose this is a qa branch okay instead of this check out branch tick mark i have unticked this one i do not want to check out just i want to create the branch named qa but i do not want to switch to qa okay let's let me click ok over here just see branch qa was created but still it's pointing to master branch in the right hand side if you see this mouse cursor it's pointing to master branch so you got that picture right so create the branch and switch and create the branch don't switch hope you got a click crystal clear picture okay again if you want to switch to uh that qa branch let's see master dev and qa okay now let's uh switch to qa here do check out just see git qa currently we are in qa branch okay so this is that overall idea that how we can create a branch in uh intellij idea and how we can switch from one france to another reference right so hope you got a crystal clear uh picture so if you have any doubt or any anything you want then you can have a comment in the comment section and if this video is really helpful uh i just want your valuable feedback in the comments sections and that that will be a lot to me and it will give some positive motivation to me to upload some uh such more videos like this right so thank you for watching guys
Info
Channel: Java Shastra
Views: 19,909
Rating: undefined out of 5
Keywords: git checkout -b, git branch Intellij Idea, git branch intellij, git checkout intellij, how to switch git branch intellij, how to create git branch, how to create git branch using intellij Idea
Id: ErDxkw5orCY
Channel Id: undefined
Length: 9min 35sec (575 seconds)
Published: Mon Jul 25 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.