Skip to content

Fork-Based Contribution Model

JTE follows a fork-based contribution model, also called a Fork and Pull Model.

Contributors work in their own Forks on Feature Branches and send changes through Pull Requests to the main branch of the upstream JTE repository.

Add the Upstream Remote

After forking the upstream repository, it's helpful to add the upstream repository as a remote.

This can be done by running the command:

git remote add upstream https://github.com/jenkinsci/templating-engine-plugin.git

Contribution Workflow

After creating your fork and adding the upstream remote, use the following workflow to submit changes to JTE:

An overview visualization of the Contribution Workflow described below

Step Description Git Commands
1 Create a Feature Branch Create a branch specifically for your change git checkout -B <branch_name>
git push --set-upstream origin <branch_name>
2 Push Changes Push incremental changes to your feature branch git add <files>
git commit -m <message>
git push origin <branch_name>
3 Submit a Pull Request Open a Pull Request to the main branch of the JTE repository Done via the GitHub web interface
4 Incorporate Feedback The JTE maintainers may provide some feedback. git add <files>
git commit -m <message>
git push origin <branch_name>
5 Merge Once accepted, JTE maintainers will merge the PR no action on contributor's part
6 Resynchronize with upstream The merge will squash the commits, so realign your fork with upstream git checkout main
git fetch --all
git merge upstream/main
git push origin main
7 Delete your Feature Branch Your feature branch can now be removed git branch -d <branch_name>
git push origin --delete <branch_name>
Back to top