GitLab comes with a browser-based IDE for editing your code in place. This video goes through the basics of how it works.
- [Instructor] Now that we've looked at the simple editor let's check out the Web IDE. I'll click on Web IDE. You can see this gives us a pretty different view. There are a couple of features of the Web IDE that I'd like to highlight. First, you'll notice if you open up READEME.md that you have the option of preview markdown. This is nice because it means you don't have to wait until after your file is committed before seeing what your changes look like. You might also notice that the text of your read me in the edit section is highlighted blue. That's because GitLab supports some syntax highlighting. It recognizes major source formats. So try creating a file by clicking on the new file icon. And we'll call this one hello.rb. For a ruby file. Click create file. You'll notice that there's a little ruby symbol next to the file name here. That shows you that GitLab has recognized the file format and will apply appropriate text highlighting. Let's open that up. And we'll make the text here, puts hello world. This will just print out the string, hello world, followed by a new line. You can try the same thing in python or bash script, or any other comment format, it really supports a lot. There's one other feature of the IDE that I'd like to highlight. And in some ways it's really what sets this experience apart from GitHub or Gitea. Notice that there's a commit button in the lower left. We can click on that, and it will bring up the changes we've made. Now, these haven't been staged yet. They're just unstaged changes. So, first we need to stage them. This is the equivalent to the get ad command. That moves them into the staging area. And there will be a bundle of commits that we're ready to stage. We could make multiple edits to multiple files and put them all into a single commit using the Web IDE. So go ahead and click the commit button. And we can just accept the default message again. And we'll commit directly to the master branch. Let's open that up again just to take another look. I'll add another line. This time, I'll just put in a comment that's hello world script. And I'll click commit. Notice this interface here. This is the diff interface. It shows you the difference between the two files. So here's one that already exists. You see in green here, the change we're trying to add. If we had deleted a line, it would show up over here in red. And then over here there might be something in green that we were replacing that deleted line with. As we move on with the course we'll see more examples of diffs. But this is really a key part of Git and GitLab because it helps you understand what's actually happening to the files in each commit. And that's the basics of editing with GitLab. If you're doing a lot of coding, you probably want to use some external editor of some kind. But the built in interface is surprisingly capable.
- Navigating the GitLab interface
- Using GitLab for collaboration
- Merging requests
- Continuous integration and continuous delivery
- Creating and running a pipeline
- Deploying a project using GitLab