【问题标题】:What are the steps needed to collaborate on an existing GitLab project?在现有 GitLab 项目上进行协作需要哪些步骤?
【发布时间】:2020-06-30 19:50:45
【问题描述】:

我需要修改 GitLab 上的现有项目,该项目有很多存储库。

我需要修改的存储库只有 Master 分支,只有 1 个文件(我将要修改的那个)。

我在 Atom 上使用 git-plus 包,我应该执行哪些步骤才能在本地获取存储库并在之后对远程存储库执行更改?

【问题讨论】:

标签: git version-control gitlab atom-editor


【解决方案1】:

你应该 git clone <remote_url> 将 repo 转移到你的本地机器,然后 git branch <your_branch_name> 然后用 git checkout <your_branch_name> 切换到它。现在每个提交都将转到您的新分支。

当您完成工作并希望将更改合并到 master 时,根据您的设置,您可以简单地合并或创建拉取请求并让管理员验证它然后合并。

要合并到master,首先切换到master分支git checkout master然后git merge <your_branch_name>。不要忘记git push 将更改传播到远程。

如果您是 git 新手,请尝试这个交互式教程来学习基础知识:https://learngitbranching.js.org/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-21
    • 2016-03-05
    • 2014-03-13
    • 2016-01-05
    • 2016-05-17
    相关资源
    最近更新 更多