 Hello, everyone. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So today we are having one more session on deployment. And in this session, like Abhishek will be demoing how you can create repository where you can push your code and you can retrieve your code. So he will be demoing you the use of Git. So this is day 86. And today we'll be completing whatever we have planned related to deployment. And like we are thinking about end deployment. So if that will be feasible next week, so I will have Abhishek one more time for that purpose. But that is not sure as of now. So we'll let you know about that in next week. Right. So welcome Abhishek on the platform. So like people are getting benefited with your deployment related knowledge because as a developer or administrator, this deployment knowledge is very much important no matter whether you are doing deployments or not. Right. Because in Salesforce, projects, we have lots of environments and we knew we should know like how things moves from one environment to another. So today, like you will be explaining them how we can create repository. So that also will be helpful for them. Okay, so moving to next slide. So if you want to become part of Sanjay Gupta Tech School community, so you can just scan this QR code. More than 3000 folks who are like learning Salesforce, they are connected here. So you can join it and ask questions there and you can discuss. And if I want to show you the upcoming plan, so on next slide, you will see the next week's plan. So in next three weeks, we'll be having QA related session and after that, I will do some mock interview sessions. Right. And from next week, we'll be starting Omni Studio bootcamp as well. So two days I have capped for this Salesforce QA and other things. And two days I have capped for Omni Studio. So Omni Studio session tracker will be available soon by Monday or Tuesday. And next week, we'll be having one overview session where you can know like what is Omni Studio, what is prerequisite and what all topics we'll be covering. Okay, so do follow Sanjay Gupta Tech School on YouTube, LinkedIn, Instagram and Telegram. So all these are available in the next slide. So you can just go through and all the important links like session tracker and everything is available in the description. Okay. And in next slide, you can see it is written just provide review. So reviews are important. So reviews or feedback, whatever you want to provide just share those. Okay. So with this note, I hand over Mike to Abhishek now. So Abhishek will be sharing his knowledge how you can create Git repository like repository with the help of Git. So over to you Abhishek. Go ahead. Thank you, Sanjay. So hi everyone. I hope you all are doing well. So myself Abhishek and I'm, I'll give you my brief introduction. So for the new folks who are joining in today's session. So I'm working as a Salesforce and Velocity developer and I have around five plus years of experience in Salesforce domain. And I have done multiple certifications as you can see, you can see it on the screen. And I'm also a double star ranger on trailer. So today, today, we will be today, we will be discussing about how you guys can create repository. So what do I mean by creating repository on Git? So basically, whenever you are working on a project. So for deployments, what what we do is, as we seen in yesterday's session, we are, we are doing the deployments manually from workbench or VS code, right? So with the help of workbench and VS code, we are just retrieving our components, like Apex class, custom object, custom fields or LWC component, anything. So we are just retrieving from one or and then we are deploying it to the target or manually, right? But when you are doing the deployments with the help of Git, so there are two parts when you are working with the Git. One is you will be creating your repository where you will be kind of uploading your metadata files to the Git repository or GitHub repository. Then from your GitHub repository, there are CI CD tools available in market. One example can be Jenkins. So with the help of Jenkins, we will connect our Git repository and the target or and then with the help of Jenkins CI CD tool, we can automate the deployment process, right? So first part of retrieval from that source or will be the same, but deploying to the target or will be the will be the automated process. So today in our session, we're going to see how we can again retrieve the components from our source or and how we can upload the upload those metadata components to the GitHub repository. And the second second part, second part we will be having upcoming sessions, right Sanjay? When we will be having DevOps sessions, so that part can be covered in that way. So one more advantage of using GitHub repository is let's say on a real-time project, you are working with the 10 people's team. So let's say if you want to, so Sanjay is one developer and me is one developer. And if I'm making any changes into the apex class and at the same time Sanjay is also making some changes in changes in the apex in the same apex class. Now what we want to do, we want to deploy our changes to the target or at the same time. So what we can do is with the help of Git, we can create our merge request or pull request separately. And those two merge request or pull request will be merge into the Git repository. So there are no conflicts between us, right? If we don't have Git repository created, then Sanjay and me, we have to coordinate with each other in order to deploy our changes at the same time. But when we are working with the Git repository, what Sanjay can do, Sanjay can create his pull request. I will tell you what exactly pull request is. And I can create a pull request of mine. And those two pull requests can be combined, combiningly merged into the Git repository. And then from there, Jenkins CICT tool can take and deploy it to the target. So on to the next slide. So we will be seeing it in action. So let me just, okay. So what we're going to do is, so I have already created a, so I have already created one repository for me, which is, which is the name is deployment. Okay. So if I go into this repository, right? So as you can see, right now in my repository, I have only one APEX Cloud, which is OS APEX example, right? So in real event, one question, which platform it is? This is GitHub. Okay. So I think they need to create a count on GitHub, right? Yeah, I was about to take that one as well. Okay. Okay. So yeah. So basically when you go to GitHub.com, you can create your account. So like I have created my account. And so right now in my account, I am the only one who has created the repository. But when you will be working in the real time projects, there will be a DevOps team which will create your Git repository. And you will be, you will be merging your code into that repository. So as you can see in my deployments repository, right? Right now I have only two APEX class, but when you will be working in the real time project, right? So you will be seeing something, oh, sorry, you will be seeing something like this, this, all your config, force app, main default, auto components, classes, LWC, then manifest, all these things will be in your Git repository over here. Right? So in today's session, we are just seeing how we can create full requests and how we can merge our code to the GitHub repository. That's why I mean, I have incorporated only two APEX classes directly into the repository. But in real time projects, you will be seeing this whole structure that CL4 support, right? Now what we're going to do is, after creating your GitHub account, what you can do is, you can download one application which is called GitHub desktop, right? And in GitHub desktop, what you can do is, you can go to, you can go to create new repository or just, yeah, you can go to a new repository and you can give any name. For example, let's say, Git demo, you can do one more, you can select your path as well where you want to create your repositories. So let's say I'm going to do here, you select this one and just click on create repository. Now what we will be doing is, what we can do is, I mean, so we have this repository in, so if I go to my folder now, right? So as you can see this deployment Git and in the deployments, I have those two repositories at the local, right? So I think once you click on FATS, then it is retrieved from that Git, right? Git repository. Correct, correct. And when I click on, so let's say I'll open this APEX class in my VS code for now. So you can use any of the editor, whichever editor you want to use. So let's say I'm going to add, let me go to VS code again. Yeah, so here if I go to this OS APEX example, so on my GitHub repository, I have this code right now in my APEX class, right? Now what we're going to, so I have passed that APEX class to my local machine. Now what I'm going to do is, I'm going to add a system debug statement. These sort of things, you won't be doing it manually. You will be fetching your components from the source or the source environment. For demoing purpose, I'm just adding one system.debug in my APEX class and when I go to my, I'll go to my GitHub desktop application again and then you can see your changes are reflected over here, right? And then what you can do is, you can create one branch from your main repository. So basically whenever you will be fetching your Git repository into your local, there will be a main branch automatically created and after that, as a best practice, what we do is, we create a separate branch from the main branch so that we can create a pull request. So let's say I'm going to call it as PR1. If I go here, so let me add that system.debug again, here again and I can see my changes and then what I can do is, from this option, right? So till now, what steps we have followed, first we have created our account to the GitHub, then we have cloned the GitHub repository to our local machine and after that, we have created a branch from our main branch. So that main branch will get created automatically and from that main branch, we will be creating a new branch in which we will be making our changes and pushing it to the Git. So we have made our changes. After that, what we need to do is, we will be committing these changes to the Git repository. So let's say I'm going to type it as update Apex class. It can be any message that you want to give. Then I'll do this commit PR1 and after that commit PR1, I need to click this button which is called publish branch. So this branch has been published to my GitHub repository. So if I go to my GitHub again and if I go back, so till now we don't have anything, right? And as soon as I refresh this one, I'll be seeing the feature branch or the new branch that we have created. PR1 had recent pushes less than a minute ago, right? Then we need to click on this compare and pull request and after that, you will be creating a pull request. And so this is a pull request that has been created. So till now, you have created a new branch from your main branch and you have made changes and pushed to the GitHub. But those changes has not been merged to the main branch right till now. First, this PR or pull request will go to your senior developers or your tech leads or your architects, then they will review your code, whatever changes that you have made. And then they will be clicking this button merge pull request. Right? So this repository, I have created, I am the only one who has created it. That's why this merge pull request button is enabled for me. And how can I verify my changes? You can just go to this file changed. Right? And in the file chain, you can see that you have added this system.db. Right? Now, let's say you forgot to add some changes with me to be deployed to the GitHub. So you will be having question whether I have to create a new branch again, then do all the commit thing again? No. What you can do is you can simply go to your let's say I want to add one more system debug, right? I'll just add over here. I will save this. And in my GitHub, that change will come again. So for the second time, you don't need to create a new branch from your main branch again. You can just simply make any changes. And so, and those changes will reflect. Now you have to just commit to it. So like if I go to GitHub again, in my pull request right now only there is one commit is there. Right? Now if I'll be doing again, commit to PR1 and push to origin, right? Very good. So now you can see that I have two commits in my pull request. So once you have created your new branch and you have committed your code to the GitHub and then you then you want to know that you have missed one change that needs to be deployed. So you don't need to create any new branch from your main branch. You can just create a new commit to the same branch. And that will be incorporated in the same pull request as a new commit. So now if I go to file change, right? So I will be able to see both the changes. So in first commit, I added this system debug and in the second commit, I added this one. Right? So once you have created your pull request, you will be reviewing it. And after that, after that, you are this kind of URL you will be getting and you will be sending. If you are working as a senior, a junior developer, then your techniques and your seniors will be merging your pull request into the main branch because this changes are into your new branch right now. These changes are not deployed to your main branch till now. So let's say I have sent my pull request to my senior or tech lead, then they will be again reviewing it from the file change section. And if all, all good, then they will just click on this merge pull request and conform on. And as soon as you have as soon as your tech lead or senior has merged your pull request, then again you can go to the deployments and you just go to your this. So we have made changes into this apex class. So previously there were those two system debugs was not there. Now those two system debugs are there. So this is how you can this is how you can make a clone of your GitHub repository to your local machine. Then you can create your feature branch or a new branch from the main one. And then you will be making changes, whatever changes you want to make. And then you will push it to the GitHub, then you will be creating a pull request. And from that pull request, you will verify your changes and then will send your pull request to your seniors and tech leads. And they will as soon as they will merge your pull request, all your changes will be merged to the main branch on the GitHub. Right. So as we discussed, there are two parts. First one is making changes, uploading your changes to the GitHub. And the second part, which is deploying your changes from GitHub to your target on. So that's a part that that part is called as CICD automation. And that so in so in today's session, we will be covering only this how you can create pull request and upload your data to the GitHub. Right. And there is one question like apex class file is fine, but how to deal with objects. So do we do we create repository for objects as well? Yeah, so let's do that one as well. What we will do is the objects step. Okay. So right now, we don't have anything. So what we're gonna do is so this can be put. Yeah, this can be a perfect example how what steps you need to follow. So what we're gonna do is we're gonna extract the account object. Right. So this this part of retrieval we have seen in yesterday's session. So my account object will get retrieved in my local machine from here. As you can see, in objects, I have all the things fields, list views, validation, rule and babelics and all all other things for that account object. Right. Now what we're gonna do is again, we're gonna go to the go to our GitHub. Right. And we're gonna. So we made our changes into PR one and those changes are much to the main branch. Right. Let's say at the same time, Sanjay also created one PR. And that changes is also get got much to the main branch. Right. But in my local machine, I don't have Sanjay Sanjay's changes. Right. I have only mine. So what we what we're gonna do is whenever we are creating a new pull request, we have to switch to the main branch. And we will click this fetch origin so that whatever changes Sanjay has been has uploaded. Right. I have to get all those changes into my local machine. And after you click on that fetch origin, you will click on this pull origin. So that all the changes that have been deployed by uploaded by some other developers, those will be coming into your local machine. Now, what we're gonna do is now you're gonna create a new branch. So let's say, I'll call it as deploy, deploy object, I'll create a new branch. Right. And I will, okay, we can publish, publish it later on. Now what we're gonna do is we're gonna, we're gonna go to, we're gonna go to our folder where, where that account object has been retrieved. So this is my folder deployments, force app, main, default. And now if I go to objects, I will be seeing my account object. So what we will do is, so right now we don't have account object already on the GitHub, GitHub repository. So we will copy our this whole account, account folder, and we will go to our, we will go to our deployment, our deployment folder, where deployment folder, which is connected to your GitHub, GitHub desktop application. So this is my folder and I'll go to deployments. So let's say I want to paste it over here only. So I have my account object is there. Right. Now if I, if we go here again, I think it would be inside deployments. Yeah, yeah, correct, correct. So this will go here. Now if we see, we have all our changes over here. So in usual scenario, this account object, or let's say any Apex class, whatever, so whatever, let's say there is a Apex class that has been already created on the, on the GitHub. So we will be just making changes in it. So right now account object was not on the GitHub. That's why we are pasting the whole folder. But when let's say in future I'm creating a new field. Right. So if I'm creating a new field, so what I have to do is I will be just going into the account account folder and in the field section, I will paste my new field. So I don't have to paste the whole account folder again and again. This is for the first time. That's why we are doing it. And again, we will click on this. Let's say account object and commit my changes and publish the branch. So this branch will get published to my GitHub repository. And now if I go to my GitHub again, and this is my main, see, again, I have one more pull request. I can simply click compare, same step we can follow, compare and pull. And then I'm just created. And now if I go to file changed, I will be able to see all my changes over here. So if I go to my deployments, right now I have deployments folder. Right now, I have only two things. One is Apex class and one is XML file for that Apex class, right? So let's say you have created your pull request, you have sent this pull request to your senior folks or tech leads, and they have merged your pull request, right? After merging of your pull request, because as you have created a new feature branch, which is called as deploy object, now if you go to your, again, the main branch, and if you refresh it, refresh it, you will be able to see the account, right? And in your account object, you will be able to see everything. Great. So we have few questions. So one question is how to update the branch to get new code changes done by others to my branch created? Yeah, so that's what we have seen just now. So what I did is, let's say now I want to create a new PR, I will switch to my main branch again, and I'll click on this patch origin. And as soon as you will click on your patch origin, you can click on this pull origin and all the changes which has been done by some other developers, those changes will get downloaded into your local machine into the main branch, right? And from there now you can create a new branch and make changes again. And another question is, why did you create one more branch for objects? Why not same branch used for Apex that we used for Apex? Yeah, because when I made the changes for Apex class and created the pull request, that pull request was already merged by me into the main branch, right? So I cannot commit the same, I cannot create a new commit to the PR or pull request which has been merged. That's why I created a new branch. So I hope Shubhashini, your questions are answered. If anyone else is having any more questions, so you can ask so that Abhishek can answer. And all these things like you, whatever you have learned in today and last, last day session. So you just need to do some practice, then only you will be able to understand these things. Okay, so I don't see any more questions coming up. So maybe people will do practice and if they will be having more questions, so they can ask them in the telegram group. So Shubhashini, which question you are not getting? I think they are straightforward in the previous question like how you will be getting the new code changes, you just need to fetch the origin. And for another one, like if your branch is already merged, then you just need to create new branch, you cannot reuse that. So these are the answers to your questions. So someone is asking, can we delete pull request? Yeah, I mean, we can delete the pull request, but that's not a best practice because why we are uploading our changes to GitHub so that we can control the version. So let's say if Sanjay is making any changes on the GitHub, in any of the Apex class, now I want to track what changes have been made by the Sanjay. So if we delete the pull request, then we will not be able to track what changes have been made by the Sanjay or me. Okay, so Shubhashini is asking in yesterday's session, I used two instance, but I'm not able to see manifest folder. But I think it comes automatically whenever we connect our org with VS code. Yes. So basically, for that question, whenever you are trying to connect your VS code to your Salesforce org, right? So there are two options. One is create project, and second option is create project with manifest. So you need to select that option. Yeah, so Shubhashini, for creating, correcting your org with the VS code, so you need to create project with manifest, then that manifest file will be available. Okay, so I think we answered all the questions. So thank you so much, Abhishek, for your time and sharing your knowledge with community. And if we will be having something more related to deployment, so we can deliver that next week. Otherwise, we'll be starting Omni Studio next week. Yeah, okay. Thank you so much. Thank you everyone for joining the session. See you next week. Bye, everyone.