This page describes the process of submitting code to .
After logging in, you'll see current projects hosted on Stash. Click on project link:
You'll see a list with all repositories, click on :
In the repository page, hover over the ellipsis button on the left and click on the Fork option:
In the next screen, it'll ask for your fork name, it will default to FreeSWITCH and you can leave it like that as we'll work with branches to do our pull request. This will bring you to your fork repository:
In your new fork page, we need to enable public access. To do this, click on "Settings" on top of the page, and then "Repository" under "Permissions" and check the enable box under "Public Access":
git clone https://YOUR_USERNAME@freeswitch.org/stash/scm/~YOUR_USERNAME/freeswitch.git cd freeswitch
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:
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.
There's two ways to create a branch, first is using git directly:
$ git checkout -b bugfix/FS-1234-fix-this-little-thing Switched to a new branch 'bugfix/FS-1234-fix-this-little-thing'
Or, you can use a link from the JIRA you'll work on. Take a look on the right side of the screen, there's a Create branch link:
Next screen, choose the branch type and name (the default one is good):
Now you can pull the new repo changes:
$ git pull --rebase ... * [new branch] bugfix/DOCS-39-instruct-users-to-use-only-one-fork -> origin/bugfix/DOCS-39-instruct-users-to-use-only-one-fork ...
Checkout the branch:
$ git checkout bugfix/DOCS-39-instruct-users-to-use-only-one-fork [22:34:26] Branch bugfix/DOCS-39-instruct-users-to-use-only-one-fork set up to track remote branch bugfix/DOCS-39-instruct-users-to-use-only-one-fork from origin. Switched to a new branch 'bugfix/DOCS-39-instruct-users-to-use-only-one-fork'
Make your change:
Commit the results locally; see the Commit Guidelines for how to write a good commit message:
git commit -va
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 Stash
git push origin
To create your Pull Request, go to Stash page and navigate to the repository which you want to contribute your changes, in this case , and click “Pull Request” Button bottom left:
Select your repository and your branch, edit the Title (it will default to the branch name, there's must be a Jira id on it, in this case, FS-1234), the Description (it will auto populate with commit messages from commits on the branch not already in master repo):
Congratulations! You just created your first Pull Request.
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 to Stash, 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.
To increase your chances of having your pull request accepted, please make sure you follow our Coding Guidelines and Commit Message Guidelines.
If you have not received feedback on your Pull Request by the regular Thursday Bug Hunt/Patch Review conference call, Call in to the bridge at 2PM US Central Time (1900 GMT) and ask to have your patch reviewed.
For more informations about our conference schedule, see ClueCon Weekly Conference call.