Making changes to code

Making and committing our changes

Before making any changes, we'll want to make sure that we can build the project. Hopefully, how to build the project will be described in the README, as it is for this example. Let’s open the terminal and build the project as described. In this example, we need Docker, which is already installed and running.

Build the project

Now that we know we can build the project, we can start making changes. First, we need to look for the right place to make the change. We might navigate the project in the Project tool window ⌘1 (macOS) / Alt+1 (Windows/Linux), or look for a specific file or code snippet using Find in Files ⌘⇧F (macOS) / Ctrl+Shift+F (Windows/Linux).

Project tool window

Find in files

We might want to create a specific branch for our changes.

Once we are done making our changes and the project still builds, we can commit our changes ⌘K (macOS) / Ctrl+K (Windows/Linux). We can check our changes in the Commit tool window ⌘1 (macOS) / Alt+1 (Windows/Linux) to see if these are the right files and use Show Diff ⌘D (macOS) / Ctrl+D (Windows/Linux) to see if the changes are correct.

Commit changes

Check the differences

If we don’t have access to the original project, we need to push our code to our fork.

Push