简体   繁体   English

gitlab4j - 从 Java 创建一个提交到分支

[英]gitlab4j - create a commit to branch from Java

I am using gitlab4j API to access my GitLab Repository.我正在使用 gitlab4j API 来访问我的 GitLab 存储库。 I want to commit a text file from my local system to specific branch.我想将一个文本文件从我的本地系统提交到特定的分支。 How do I achieve this via gitlab4j API?如何通过 gitlab4j API 实现这一目标?

As far as I see in the documentation, there is a Commit API that you can use to manage commits.据我在文档中看到的,有一个Commit API可用于管理提交。

The Commit API has a method to create a commit where you can specify the branch name, commit message and other details. Commit API 有一个创建提交的方法,您可以在其中指定分支名称、提交消息和其他详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM