grgit - Adding commit from one branch to another in a gradle task -


my requirement add last commit of branch 'a' branch 'b'. did research , found out 'cherry picking' can solution this.i want write gradle task doing operation. so, this:

task copycommits() <<{ def grgit = org.ajoberstar.grgit.grgit.open(dir: project.parent.projectdir) grgit.checkout(branch: 'b') 'git cherry-pick 2133467'.execute().text.trim() 

}

branch local branch. above task doesn't perform required operation.

i not able use cherry-pick here since want push commits other branch. worked me here:

task pushchanges() <<{  def grgit = org.ajoberstar.grgit.grgit.open(dir: project.parent.projectdir) 'git push origin a:b'.execute().text.trim() } 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -