Skip to main content

Pull Requests

About

This page describes the process of submitting code to FreeSWITCH.

Click here to expand Table of Contents

Forking FreeSWITCH with Github

  • Create a new account in Github
  • Create a new issue in Github, describing the feature you want to develop or the problem you're trying to fix.

In the FreeSWITCH repository page, hover over the fork button on the right and press it

Clone your fork

Clone your new fork

git clone https://github.com/${YOUR_USERNAME}/freeswitch.git
cd freeswitch

Ensure Git is Setup

Tell git your full name and email address – make sure to use your real name and not a username. Inside your FreeSWITCH source directory, run scripts/setup-git.sh:

./scripts/setup-git.sh 

Create your working branch

It's easier if you create a branch to work exclusively on the issue you'll fix, also, this makes easier to sync your fork repository since you're not committing to branches that aren't in the main repo.

$ git checkout -b bugfix/fix-this-little-thing
Switched to a new branch 'bugfix/fix-this-little-thing'

Commit your changes

Commit the results locally; see the Commit Guidelines for how to write a good commit message:

git commit -vam "[my_module_name] This commit fixes all the things \o/"

Please follow the commit guidelines the module name the commit references with [my_module_name].

This makes easier to read commits and see which module is affected.

Create more commits as needed such that each commit represents a logically separate change:

#while true; do emacs .; git commit -va; done

Review changes and ensure your author name is correct:

git log -p

Push changes to your forked repository

git push origin

Create Pull Request

To create your Pull Request, go to Github and navigate to the repository which you want to contribute your changes.

In the "Pull Requests" tab, click "New pull request" to create a pull request against FreeSWITCH.

Updating Pull Request with new code

If one of the developers ask you to modify your code, there's no need to create another pull request.

Each pull request tracks the branch from the forked repository, so when you commit more changes and pushes those changes, the pull request is automatically updated with the new commits.

Always create one branch for each pull request. If a developer asks for a change, make the change in the specific branch, and push the new change.

Getting feedback

To increase your chances of having your pull request accepted, please make sure you follow our Coding Guidelines and Commit Message Guidelines.

Attachments:

Stash Login.png (image/png)
Stash Projects.png (image/png)
Stash - FreeSWITCH Repo.png (image/png)
Stash - Fork.png (image/png)
Stash - Fork PopUp.png (image/png)
Stash_-_Repo_Settings.png (image/png)
Stash_-_Repo_Settings.png (image/png)
Stash_-_Repo_Permissions.png (image/png)
Stash_-_Repo_Permissions.png (image/png)
Stash_-_Pull_Request.png (image/png)
Stash_-_Create_Pull_Request.png (image/png)
Stash - Fork.png (image/png)
Stash - Fork.jpg (image/jpeg)
Stash_-_Fork_FreeSWITCH.png (image/png)
Stash_-_Settings.png (image/png)
Stash_-_Public_Access.png (image/png)
Stash_-_Create_branch.png (image/png)
Stash_-_Create_branch_2.png (image/png)
Stash_-_open_pull_request.png (image/png)
Stash_-_Create_pull_Request_3.png (image/png)
fork.PNG (image/png)

Comments:

Step "Clone your fork"https not work (error: The requested URL returned error: 400 Bad Request while accessing https:// ...), go to actions-clone and copy url for ssh, it works. Posted by denis at Nov 06, 2015 12:19
did you just copy and paste the line above for cloning your new fork? if you did and you didnt change the part that has "YOUR_USERNAME" in caps to your actual username its not going to work... Posted by silik0n at Dec 13, 2016 12:47