Squash a Branch

How-to use the JS WOQLClient to squash commits in your branch's history
Squashing allows you to combine multiple commits in your branch's history into a single commit.
const squashBranch = async () => {
const branchName = "mybranch"
const commitMessage = "merge all the commits"
await client.squashBranch(branchName,commitMessage);
// get mybranch commits list
const commits = await TerminusClient.WOQL.lib().commits("mybranch");
console.log("Show my commit after squash", JSON.stringify(commits.bindings,null,4))
An example response -
"@value":"[email protected]"
"Commit ID":{
"@value":"merge all the commits"
"Parent ID":null,