In this blog, we’ll look at how to integrate Github with postman app using a integration option that is available in postman app. The postman version 10 and later supports Git integration through the API builder. Before jumping into integration lets see what is Postman and Git.
Introduction to postman:
Postman is a popular API (Application Programming Interface) development and testing tool used by developers to build, test, and document APIs. It offers a user-friendly interface to send requests, receive responses, and automate API testing.
Key Features of Postman
User-Friendly Interface: Postman provides an intuitive interface that makes it easy to construct HTTP requests and read responses.
Request Building: You can create and save complex HTTP requests. Postman supports various types of requests like GET, POST, PUT, DELETE, etc.
Environment Variables: You can define variables for different environments (development, testing, production), making it easy to switch contexts.
Collections: Organize your requests into collections for better management and reusability. Collections can be shared with your team using team workspace.
Testing and Automation: Write test scripts using JavaScript to automate API testing. Postman allows you to run collections of requests in a sequence, making automated testing straightforward.
API Documentation: Generate and publish API documentation directly from Postman, which helps in maintaining up-to-date API documentation.
Mock Servers: Create mock servers to simulate API responses, useful for testing even when the backend is not fully developed.
Collaboration: Postman supports team workspaces, allowing teams to collaborate on API development and testing in real-time.
Introduction to Git:
Git is a widely-used version control system that helps developers track changes in their code, collaborate with others, and manage project versions.
Key Concepts of Git
Repository (Repo): A directory that contains your project files and the entire history of their changes. Repositories can be local (on your computer) or remote (hosted on platforms like GitHub, GitLab, or Bitbucket).
Commit: A snapshot of your project at a specific point in time. Commits are used to record changes and can be referenced or reverted to.
Branch: A separate line of development. The main branch in many repositories is called main or master. Branches allow you to work on different features or fixes independently.
Merge: The process of integrating changes from one branch into another. This is commonly done to incorporate new features or bug fixes from feature branches into the main branch.
Clone: Creating a local copy of a remote repository. This allows you to work on a project locally.
Pull: Updating your local repository with changes from a remote repository.
Push: Sending your local changes to a remote repository.
Steps to integrate Postman to Git:
Login to Github with your credentials. On the right side click blue logo with your name to navigate to the setting as shown below.
![](https://static.wixstatic.com/media/60d17a_4bf98ef9083842caba7fbfdb21940ff3~mv2.png/v1/fill/w_900,h_527,al_c,q_90,enc_auto/60d17a_4bf98ef9083842caba7fbfdb21940ff3~mv2.png)
Click on the setting.
![](https://static.wixstatic.com/media/60d17a_461169750d214cda917aaf827a4ae8e5~mv2.png/v1/fill/w_900,h_722,al_c,q_90,enc_auto/60d17a_461169750d214cda917aaf827a4ae8e5~mv2.png)
Click Developer settings
![](https://static.wixstatic.com/media/60d17a_6dbf016501d5433789122cedae1e057e~mv2.png/v1/fill/w_980,h_596,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_6dbf016501d5433789122cedae1e057e~mv2.png)
On the developer setting page click on "Personal access tokens" and select Token(classic).
![](https://static.wixstatic.com/media/60d17a_dbcd649386ec4ec9adb4c70a33638d2c~mv2.png/v1/fill/w_980,h_199,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/60d17a_dbcd649386ec4ec9adb4c70a33638d2c~mv2.png)
On the Right side click Generate new token and select "Generate new token(classic)"
![](https://static.wixstatic.com/media/60d17a_32819ca247ca4fff9abd41b83c6114db~mv2.png/v1/fill/w_980,h_299,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/60d17a_32819ca247ca4fff9abd41b83c6114db~mv2.png)
Give credential to generate a new token. In the New personal token access page give the note that describe the token name. Select the expiration and select scopes as per the requirement.
![](https://static.wixstatic.com/media/60d17a_6dc9eb28792e48daaf82ee63198bbc43~mv2.png/v1/fill/w_980,h_540,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_6dc9eb28792e48daaf82ee63198bbc43~mv2.png)
And click on generate token.
![](https://static.wixstatic.com/media/60d17a_7449b1af1c474c7fac0bba1aff57a9dd~mv2.png/v1/fill/w_980,h_558,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_7449b1af1c474c7fac0bba1aff57a9dd~mv2.png)
Token will be displayed in the green box. Copy and save it. You won't be able to see it again.
![](https://static.wixstatic.com/media/60d17a_34b92ca77b874155a06d0f9c721a1d51~mv2.png/v1/fill/w_980,h_395,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_34b92ca77b874155a06d0f9c721a1d51~mv2.png)
Note: If the token is lost or not saved you can regenerate the token.
Create a Repository in GitHub:
This step is optional. Either you can create a repository or use the existing repository to integrate.
To create a repository follow the below steps:
In the home page of Github click on New to create a new repository.
![](https://static.wixstatic.com/media/60d17a_4177419c4efc4d81b64b4c04cb3f868b~mv2.png/v1/fill/w_900,h_431,al_c,q_90,enc_auto/60d17a_4177419c4efc4d81b64b4c04cb3f868b~mv2.png)
Provide the repository name and click the radio button to make it public or private. select other option as per the need and create the repository. This repository can be used in postman integration.
![](https://static.wixstatic.com/media/60d17a_6ba54632fc4842e6ad9f9a5d4007439f~mv2.png/v1/fill/w_900,h_843,al_c,q_90,enc_auto/60d17a_6ba54632fc4842e6ad9f9a5d4007439f~mv2.png)
Postman Integration:
Login into the Postman app. Select Home-> Integration.
![](https://static.wixstatic.com/media/60d17a_69b73efe83004c748d3da3529145277e~mv2.png/v1/fill/w_980,h_499,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_69b73efe83004c748d3da3529145277e~mv2.png)
The integration page looks like below. Click on Browse all integrations.
![](https://static.wixstatic.com/media/60d17a_f69ea748de5d4367b4a13f41a4d444d0~mv2.png/v1/fill/w_980,h_429,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_f69ea748de5d4367b4a13f41a4d444d0~mv2.png)
Select GitHub from it.
![](https://static.wixstatic.com/media/60d17a_af7adaaed8624aa898ab73fb227621cd~mv2.png/v1/fill/w_980,h_551,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_af7adaaed8624aa898ab73fb227621cd~mv2.png)
Select Backup a collection. and Add integration.
![](https://static.wixstatic.com/media/60d17a_e81f9bf51e2d4e34a1c88e53e6c5a993~mv2.png/v1/fill/w_980,h_594,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/60d17a_e81f9bf51e2d4e34a1c88e53e6c5a993~mv2.png)
In this page provide the token saved from Github and click Authenticate and proceed
![](https://static.wixstatic.com/media/60d17a_03c2bbc0a067404486e64fe3d580acaa~mv2.png/v1/fill/w_900,h_377,al_c,q_85,enc_auto/60d17a_03c2bbc0a067404486e64fe3d580acaa~mv2.png)
In the Add integration page you will be able to see your github profile name after getting authenticated.
Now provide the nickname to identify the integration once created.
Select the workspace it can your "My workspace" or "Teams workspace".
Choose the collection that needs to be integrated.
Choose the repository that is in the github so that collection will be backed up.
Enter the Directory to push the collection in it(Optional).
Enter the filename this will be the name of the collection json file in the repo.
Finally choose the branch and click Add integration.
![](https://static.wixstatic.com/media/60d17a_209901a9e3214498aa7b0f0478fcba4f~mv2.png/v1/fill/w_903,h_966,al_c,q_90,enc_auto/60d17a_209901a9e3214498aa7b0f0478fcba4f~mv2.png)
Conclusion - We now integrated postman with git and any changes done the postman collection will get updated in the repository without the need to push or pull. You can also create fork in your postman collection to push or pull your changes to the git.
If you are a sports lover, you can play basket random. This is a game that helps you experience the top basketball matches.