
No Comments Yet
Be the first to share your thoughts and start the conversation.
GSAP Course launch discount ends soon!🎉
Claim DiscountBe the first to share your thoughts and start the conversation.
How did you manage to remove the blur property and reach here?
Upgrading gives you access to quizzes so you can test your knowledge, track progress, and improve your skills.
By logging in, you'll unlock full access to this and other free tutorials on JSM Pro.
Why? Logging in lets us personalize your learning experience, track your progress, and keep you in the loop with new workshops, coding tips, and platform updates.
You'll also be the first to know about upcoming launches, events, and exclusive discounts.
No spam—just helpful content to level up your skills.
If that sounds fair, go ahead and log in to continue →
Enter your name and email to get instant access
In this lesson, the speaker introduces an alternative to traditional Git commands by utilizing a graphical user interface (GUI) through WebStorm. This approach simplifies version control operations, making it easier for developers to manage repositories without memorizing complex commands. The session demonstrates how to execute common Git tasks efficiently using WebStorm's features.
add
, commit
, and push
can be challenging to remember, but a GUI offers a simpler alternative.00:00:00Â Although commands like git add, commit, push, merge, checkout, stash, and others may seem hard to remember, even though they're simple once you get a hang
00:00:09Â of them, there is an alternative method.
00:00:12Â As developers, we always discover more efficient techniques for accomplishing repetitive tasks.
00:00:18Â So let me introduce you to a completely different approach for executing these Git commands.
00:00:25Â Before I teach you these very powerful techniques, do remember that it is still super important to understand the behind the scenes of how these commands work.
00:00:34Â And that's what you've learned so far, which makes you ready to utilize the power and simplicity of this new approach.
00:00:41Â I'm referring to using Git through a GUI, a graphical user interface.
00:00:47Â It doesn't require memorizing commands, but instead offers a more visual and user-friendly approach to version control, allowing you to execute Git commands
00:00:57Â through simple buttons, panels, and menus.
00:00:59Â Many editors and IDEs offer Git integration through a GUI, but their functionality is limited compared to WebStorm's features.
00:01:09Â So I highly recommend downloading WebStorm, it's free and packed with powerful Git integrations.
00:01:15Â But if you prefer not to, no worries, you can still follow along with the video and check if your editor supports some of the features that I'll be showing
00:01:24Â in WebStorm.
00:01:25Â We can start from scratch by creating a completely new folder and create a new readme.md file within it.
00:01:33Â There we can say something like testing Git through a GUI, a graphical user interface.
00:01:42Â First things first, let's turn this folder into a Git tracked repository.
00:01:47Â On the top left or the bottom right, you can click version control and then create a Git repository.
00:01:54Â Open up the current folder.
00:01:56Â And immediately, this folder will be turned into a Git repository.
00:02:01Â This is the same as running the git init command.
00:02:04Â And immediately, you can see that right now you're in the main branch.
00:02:08Â I actually prefer having this on the bottom right, so I'll press Command-Shift-B, then I'll search for Toolbar, and I'll hide it.
00:02:17Â If you hide the toolbar, then its details will appear at the bottom right.
00:02:21Â So right now, you can see all of the branch details here.
00:02:24Â Now that we have initialized the Git repo, let me show you how you can commit using a GUI.
00:02:30Â You can go to the bottom right corner and then simply click Commit.
00:02:34Â It'll immediately lead you to this menu showing you all the unversioned files.
00:02:39Â You can select all of them and then add a commit message.
00:02:42Â I'll say, initialize the repo.
00:02:47Â And I will commit the changes.
00:02:49Â It is as simple as that.
00:02:52Â Now, if you click on the main branch once again, you'll see that you also have the possibility to create a new branch.
00:02:59Â So let me show you how to do that.
00:03:01Â You just press new branch and enter a branch name.
00:03:05Â Let's do something like new-branch.
00:03:09Â And it even asks you whether you want to check out to it immediately.
00:03:12Â For now, I'll untick that and click create.
00:03:16Â So, since we haven't moved to it immediately, how can we move to that branch now?
00:03:21Â Well, you can see this little pop-up telling us that a new branch was created, so we can click here, and here you can see the new branch.
00:03:30Â But an even easier way to switch to it is to click at the bottom right, or the top left, and then simply select the branch you want to move to,
00:03:38Â and click Check Out.
00:03:39Â And that's it, you are on your newly created branch.
00:03:43Â I love how WebStorm conveniently organizes these branches into recent, local, and later on will even have remote.
00:03:51Â So you always know at which versions of your branches you're working on.
00:03:55Â But of course, that begs the question, how can we push these branches to remote?
00:04:00Â We usually use the command git push dash u origin, and then the branch name.
00:04:05Â But with WebStorm, you can do it in a single click.
00:04:09Â Just click push.
00:04:12Â Click define remote and you'll have to enter the URL of your remote origin.
00:04:17Â To get it, I'll create a new repo and I'll call it WebStorm underscore git and click create repository.
00:04:28Â And I'll simply copy the URL back in the code.
00:04:31Â I'll paste it, click okay, and click push.
00:04:36Â Check this out.
00:04:37Â All of your code has been pushed to the new branch and now a new origin new branch also exists.
00:04:44Â And it even asks you whether you want to immediately create a pull request.
00:04:48Â I won't do that yet.
00:04:50Â First, I want to teach you how we can add a few more commits to our readme.
00:04:55Â So I'll add a new line and then simply say, commit 1. Then you can either go to this commit icon on the left side and then select it and then modify the
00:05:06Â commit message and simply press commit.
00:05:10Â Or let's add another one, commit 2. You can also go to the bottom right and simply click commit there, which is going to lead you here and you can add
00:05:20Â a commit to.
00:05:21Â This time, let's check out the second option, which allows you to immediately commit and push.
00:05:28Â It's going to ask you to which branch you want to push.
00:05:30Â In this case, we want to push it to the new branch.
00:05:33Â So let's simply click push.
00:05:35Â And in a matter of seconds, all of those commits are right there.
00:05:39Â Of course, if you committed some changes earlier, like I will do in this case, commit three, add it, and then add commit three.
00:05:49Â And then later on, you want to push them.
00:05:51Â You can go to the bottom right, select push from here, and repeat the same steps.
00:05:56Â It is super convenient.
00:05:58Â Now, what about pooling some changes?
00:06:00Â Let's say that somebody else comes to your repo and inserts an additional message, like a commit for right here and updates the readme.
00:06:09Â How would you get access to that change directly within your repo?
00:06:13Â Well, typically you would have to run git pool.
00:06:17Â But by using WebStorm, you can just go here and press update project.
00:06:22Â It's going to ask you whether you want to merge incoming changes into the current branch or whether you want to rebase, which will rewrite the commit history
00:06:30Â by rebasing your current branch onto another branch, effectively moving it to a new commit.
00:06:35Â In this case, we don't need to rebase.
00:06:37Â We'll just merge it into our current branch.
00:06:40Â So just press OK.
00:06:41Â And in a matter of seconds, the commit for that another person pushed is right here within our local repository.
00:06:48Â What about viewing history?
00:06:50Â Well, let me show you something really cool.
00:06:52Â Look for the git icon at the bottom left.
00:06:56Â This one here.
00:06:57Â If you click it and expand it, you'll see a ton of different Git functionalities.
00:07:03Â You can see the exact changes that were made in this repo, who created them, and when, all within this nice-looking graphical user interface.
00:07:12Â And within here, you can do everything and more that you can do with typical Git commands.
00:07:17Â all by choosing one option from a menu that is in English.
00:07:22Â No obscure commands.
00:07:23Â If I open up the repo for jsmastery.pro platform, it is super convenient seeing exactly what is happening within our projects.
00:07:32Â We can see what changes were made, who made them, when, and whether the tests have passed.
00:07:37Â Check this out.
00:07:38Â You can even see the merges that were happening.
00:07:40Â This makes it super easy to go back to previous versions of your codebase if needed.
00:07:45Â In addition to this, if you press here, and then you press console, you can see all the commands that WebStorm is running for you.
00:07:54Â Of course, you know some of these base ones, but some of these more complex ones, well, it's going to be easier to do it using a GUI.
00:08:01Â Now, how can we use WebStorm to merge one branch into another?
00:08:06Â Typically, we would have to create it and then run git merge command to merge it into another branch.
00:08:11Â In this case, select a main branch and press this arrow right here.
00:08:16Â It's going to allow you to merge main into new branch or vice versa.
00:08:22Â Similarly, if you click the arrow on this branch, you can easily create a new branch from this branch or you can update it.
00:08:30Â In this case, let's go to main and let's merge main into the new branch.
00:08:35Â In this case, it says it's already up to date, so we're good.
00:08:39Â But what about pull requests?
00:08:41Â One of WebStorm's coolest features is that it allows you to do all sorts of tasks directly within the IDE.
00:08:48Â You don't need to use GitHub desktop or even GitHub to perform different actions.
00:08:53Â Everything you need is right there.
00:08:55Â So let's talk about creating a pull request.
00:08:58Â On the left side, you can find a pull requests tab.
00:09:02Â For you, it might be a bit of a different icon.
00:09:04Â In this case, it's a GitHub icon for me.
00:09:06Â Within here, you can do everything PR related.
00:09:09Â So let's open up a new pull request.
00:09:12Â In this case, we want to merge the new branch into the main branch.
00:09:17Â But before we do that, we have to first create a remote origin version of the main branch.
00:09:22Â So let's do that first.
00:09:24Â I'll head over to main.
00:09:27Â by checking out to it, and I'll simply push it.
00:09:30Â Push to origin main.
00:09:31Â It is as simple as that.
00:09:33Â We can immediately now use this create pull request feature to move us to this pull request menu.
00:09:38Â We want to merge from branch new branch, or you can choose origin new branch.
00:09:44Â to origin main, exactly what we want it to do.
00:09:48Â You can add a title of this pull request, such as implement for commits, because that's what we added into the readme.
00:09:56Â Description is not needed.
00:09:58Â And directly from here, you can add reviewers, assignees, and labels.
00:10:03Â In this case, I'll just click create pull request.
00:10:06Â And there we go.
00:10:07Â It is right here.
00:10:08Â If you go to GitHub and click pull requests, you can see the new pull request indeed has been opened.
00:10:14Â The next cool thing is that you can see exactly the changes that were implemented for each specific commit.
00:10:20Â So if you go here, you can see that first at some time they added a commit one, then later on they added commit two and so on.
00:10:28Â But now we're interested in all commits, so now you can review the changes that were made for each file separately.
00:10:36Â First, we want to dive into the readme.md file, so right-click it, and then it'll open up a diff.
00:10:42Â A diff, or a difference, refers to the changes of a specific file on two sides of the coin.
00:10:49Â or should I say on two different branches.
00:10:52Â One is the branch that we're trying to merge and the other one is the branch we're trying to merge the changes to.
00:10:58Â You can view those things either split like this or unified in a single editor.
00:11:03Â And based on the green or red color, you can see the changes that were made.
00:11:07Â In this case, I'm happy with the changes and I'll click submit.
00:11:11Â And if you're a reviewer, you can immediately add a review directly within WebStorm.
00:11:16Â You don't have to go to GitHub.
00:11:17Â Just by pressing a plus here, you can add a comment, something like, fix this line.
00:11:23Â And you can even start a review.
00:11:26Â There we go.
00:11:28Â Finally, you can submit your pull request review.
00:11:31Â And you can add one final comment.
00:11:33Â Looks good to me.
00:11:35Â Great.
00:11:36Â Finally, if everything looks good, you can press the three dots next to the request review button, and then say merge review,
00:11:44Â merge.
00:11:46Â Merge pull request one, it'll implement four commits, that's the title of the pull request, and we can say merge.
00:11:54Â Believe it or not, this is it.
00:11:57Â So now on main, you can simply update the project and all of these commits will come directly to your code base.
00:12:05Â I mean just how convenient and intuitive and efficient this is.
00:12:11Â At start, you might feel like you are kind of cheating the system, or that you are a bit of a less of a developer by using this help that WebStorm provides.
00:12:21Â But don't feel that way.
00:12:23Â Any tool that can make you more efficient is welcome.
00:12:26Â And what matters is that you understand what WebStorm is doing behind the scenes.
00:12:31Â And you do because you came to this point of the video.
00:12:34Â I think that in just a couple of minutes, I've showed you all of the primary functionalities that before using the terminal,
00:12:41Â I spent more than an hour to explain.
00:12:43Â And we've accomplished all of that and more in just a few minutes.
00:12:47Â But there are so many more things that you can do with WebStorm.
00:12:50Â One of these things is a fetch.
00:12:52Â If you see this icon on top right, you can just click it and it'll fetch all the latest changes.
00:12:58Â Another thing is how easily you can delete branches.
00:13:02Â We no longer need this one since we merged the changes.
00:13:05Â So you can just press delete.
00:13:07Â Here we go.
00:13:08Â That was it.
00:13:09Â You can also compare different branches, mark branches as favorite, or even cherry pick from a specific commit.
00:13:17Â If I go right here to Git at the bottom left and go back to Log, we can see all of these different commits that I added.
00:13:25Â Cherry picking is a very advanced technique, but in WebStorm, it is as simple as clicking this cherry pick icon.
00:13:32Â You click it, and it'll allow you to pick the changes from this commit.
00:13:37Â You can press merge and then you can see which changes you want to accept.
00:13:41Â This is similar to reverting or resetting to a specific commit, but it gives you even more power to pick and choose which features you want to keep and
00:13:50Â which ones you want to remove.
00:13:52Â You can also rename different branches.
00:13:55Â or even revert to specific commits directly from within this view.
00:14:00Â Typically, you would have to get the commit hash, figure out what you want to do.
00:14:03Â Here, you just press revert commit and that's about it.
00:14:06Â We cannot do it now because we have unstaged changes, but that's also pretty easy to resolve once you have WebStorm.
00:14:13Â You just go here and you can easily resolve all the conflicts and then commit.
00:14:18Â And when a technology is so good that it feels like magic based on how many things is it doing for you and it's doing them well,
00:14:25Â well, it almost feels like magic for us developers.
00:14:29Â So whichever complicated feature you want to use, you can use it within WebStorm with ease.
00:14:35Â These were just a few examples of how we can use the WebStorm GUI to perform many different Git operations without needing to rely on a single Git command.
00:14:44Â And that's only one of the reasons why I love WebStorm.
00:14:48Â While you can accomplish some of these tasks in other editors, not all of them are possible, as there's a clear difference between an editor and an IDE,
00:14:56Â right?