首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何用Java在GitLab中编辑文件?

如何用Java在GitLab中编辑文件?
EN

Stack Overflow用户
提问于 2018-10-09 00:58:59
回答 1查看 0关注 0票数 0

我想为我的学校编写一个Messenger。因此我需要一些可以保存数据的服务器。我已经找到了可以保存数据的GitLab,我已经知道如何使用Java应用程序下载文件以及如何读取文件。

但现在我的问题是:是否可以使用Java应用程序编辑GitLab上的.txt文件?

EN

回答 1

Stack Overflow用户

发布于 2018-10-09 10:28:07

试试以下代码:

代码语言:javascript
复制
git clone <url to repo>  // clone the repo
cd <repo name> // go in directory of the repo
git checkout -b <new branch name>  //create a new branch
//edit files
git add .  //this stages your changed files.
git commit -m "<commit message>"  //this commits your changes to the local repo
git push origin <branch name> //pushes the file to the server
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100002856

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档