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:-
Navigate to the Bruno Collection Location:
- Navigate to the location on your PC where you created the Bruno collection, and copy the path. [^1]
-
Change directory in Terminal:
-
Run the following command in the terminal:
-
Run the following command in the terminal:
-
Initialize Git:
-
Run the following command to initialize Git in the Bruno collection directory:
-
Run the following command to initialize Git in the Bruno collection directory:
Adding and Committing Changes
After initializing the Git repository, you can add and commit changes to your collection.-
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
.brufile with the name that you just specified.
-
Adding and committing the changes
-
Stage all the changes made inside the collection:
-
Commit the changes:
-
Stage all the changes made inside the collection:
Pushing and Pulling Changes
To share your changes with others, you can push and pull your commits to/from a remote repository.-
Pushing changes
-
Pulling changes