Skip to main content
In the open-source version of Bruno, Git operations are performed manually using the terminal or tools like VSCode’s Git features. This includes: Below is a step-by-step guide on how to use Git with Bruno in the open-source version.

Initializing Git in a Collection

To add your collection to version control, you need to initialize a Git repository in the directory where your .bru files are stored using the following steps:
  1. Navigate to the Bruno Collection Location:
    • Navigate to the location on your PC where you created the Bruno collection, and copy the path. [^1]
  2. Change directory in Terminal:
    • Run the following command in the terminal:
      cd path/to/your/bruno/collection
      
  3. Initialize Git:
    • Run the following command to initialize Git in the Bruno collection directory:
      git init
      

Adding and Committing Changes

After initializing the Git repository, you can add and commit changes to your collection.
  1. Creating a New HTTP Request in Bruno App
    • Hover over the collection name in the Bruno app.
    • Click on the three dots, then click on “New Request.”
    • Type in the name of the request and populate the URL field with https://example.com.
    • After populating the fields with appropriate values, click on the “Create” button, or you can press ENTER/RETURN on your keyboard to create the request. This will create a new .bru file with the name that you just specified.
  2. Adding and committing the changes
    • Stage all the changes made inside the collection:
      git add .
      
    • Commit the changes:
      git commit -m "Created my first Bruno request 🐶"
      

Pushing and Pulling Changes

To share your changes with others, you can push and pull your commits to/from a remote repository.
  1. Pushing changes
    git push -u origin main
    
  2. Pulling changes
    git pull origin main