In this lecture, we're going to take a look at another interesting functionality that windsurf has
and that is called workflows.
You can easily find workflows right here in the windsurf settings.
So clicking on the settings will reveal here memory and rules.
And I click here on manage I'm going to find here workflows.
So what is workflow.
You can think of these workflows like a bookmark for a set of actions that you want to take.
Like for example deploying pretty much whenever you find yourself writing the same prompt and going
over a series of steps over and over, you should consider creating a workflow instead.
So let's take a look at a very simple example.
To create a workflow, I'm going to click here on workflow and this is going to create a new file.
I'm going to name the workflow Experimental Change.
Press enter.
And this is going to be created here in the workflows directory.
And we can provide a description and also the content.
So for the description I'm just going to give the experimental change name.
And let's say that We want to use a workflow when we want to try some experiments.
So for each experiment, we want to create a new git branch.
We want to implement the changes that are requested.
And also we want to commit those changes to GitHub.
Maybe this is not the best workflow, but I just wanted to show you a relatively realistic example.
So I'm going to go ahead and save these changes.
And this is the interesting part because we need a way to call this workflow.
And this is actually done directly from the prompt right here below.
So I'm going to write here a forward slash.
And you're already going to see here experimental change appearing so I can select it.
Or as an alternative just in case you're wondering what is this thing here.
This is also a way to trigger this.
So you either press that button or use a forward slash.
And now we are going to implement a small change.
So we're going to change the title from my board to my cool board.
And let's see exactly what is happening.
So the first step a branch has been created.
And there are a few commands that we need to run.
The file header has been updated so we can take a look here at the diff.
I'm going to see that the name has been changed.
Unfortunately this is right here in the middle.
And there are a few commands that we need to run.
So we're going to add the changes we're going to commit.
And we're going to also push this change.
Of course we can decide to automate all the git commands so that we don't have to do this manually.
But we're going to get here the information.
This workflow has been done.
So branch has been created.
It has been fetched and checked out locally.
The header has been changed.
This change has been committed and pushed.
And one thing we can take a look at GitHub and see this change.
But this was the main idea of these workflows.
So again whenever you find yourself that you're going through a lot of steps and you're doing this all
the time, it's quite convenient.
You press forward.
Slash can already start that change.
Theoretically.
You don't even need a prompt after that.
So you can store everything right there can be useful if you just want to.
Let's say, for example, have a quick way of committing changes and pushing them or many other use
cases.
And I'm sure you're going to use this feature a lot.