<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Repository > 原文:[https://docs.gitlab.com/ee/user/project/repository/](https://docs.gitlab.com/ee/user/project/repository/) * [Create a repository](#create-a-repository) * [Files](#files) * [Create and edit files](#create-and-edit-files) * [Find files](#find-files) * [Supported markup languages and extensions](#supported-markup-languages-and-extensions) * [Repository README and index files](#repository-readme-and-index-files) * [Jupyter Notebook files](#jupyter-notebook-files) * [OpenAPI viewer](#openapi-viewer) * [Branches](#branches) * [Commits](#commits) * [Project and repository size](#project-and-repository-size) * [Contributors](#contributors) * [Repository graph](#repository-graph) * [Repository Languages](#repository-languages) * [Locked files](#locked-files-premium) * [Repository’s API](#repositorys-api) * [Clone in Apple Xcode](#clone-in-apple-xcode) * [Download Source Code](#download-source-code) # Repository[](#repository "Permalink") [存儲庫](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository)是用于將代碼庫存儲在 GitLab 中并通過版本控制對其進行更改的存儲庫. 存儲庫是[項目的](../index.html)一部分,它具有許多其他功能. ## Create a repository[](#create-a-repository "Permalink") 要創建一個新的存儲庫,您需要做的就是[創建一個新項目](../../../gitlab-basics/create-project.html)或[創建](../../../gitlab-basics/create-project.html) [一個現有項目](forking_workflow.html) . 創建新項目后,您可以通過 UI(請參閱以下部分)或通過命令行添加新文件. 要從命令行添加文件,請遵循創建新項目時在屏幕上顯示的說明,或在[命令行基礎](../../../gitlab-basics/start-using-git.html)文檔中通讀它們. > **重要提示:**出于安全原因,強烈建議您在使用命令行時[通過 SSH 與 GitLab 連接](../../../ssh/README.html) . ## Files[](#files "Permalink") 使用存儲庫將文件存儲在 GitLab 中. 在[GitLab 12.10 及更高版本中](https://gitlab.com/gitlab-org/gitlab/-/issues/33806) ,您將在存儲庫的文件樹中根據其擴展名在文件名旁邊看到一個圖標: [![Repository file icons](https://img.kancloud.cn/63/33/63335501c242eb34e1bd3538a0b8e6ef_3836x1912.png)](img/file_ext_icons_repo_v12_10.png) ### Create and edit files[](#create-and-edit-files "Permalink") 通過將文件推送到 GitLab,將代碼庫托管在 GitLab 存儲庫中. 您可以使用用戶界面(UI),也可以[通過命令行將](../../../gitlab-basics/command-line-commands.html#start-working-on-your-project)本地計算機與 GitLab 連接. 要配置[GitLab CI / CD](../../../ci/README.html)來構建,測試和部署代碼,請在存儲庫的根目錄中添加一個名為[`.gitlab-ci.yml`](../../../ci/quick_start/README.html)的文件. **從用戶界面:** GitLab 的用戶界面允許您執行許多 Git 命令,而無需觸摸命令行. 即使您定期使用命令行,有時[通過 GitLab UI](web_editor.html)也更容易做到: * [Create a file](web_editor.html#create-a-file) * [Upload a file](web_editor.html#upload-a-file) * [File templates](web_editor.html#template-dropdowns) * [Create a directory](web_editor.html#create-a-directory) * [Start a merge request](web_editor.html#tips) * [Find file history](git_history.html) * [Identify changes by line (Git blame)](git_blame.html) **在命令行中:** 要開始使用命令行,請通讀[命令行基礎文檔](../../../gitlab-basics/command-line-commands.html) . ### Find files[](#find-files "Permalink") 使用 GitLab 的[文件查找器](file_finder.html)在存儲庫中搜索文件. ### Supported markup languages and extensions[](#supported-markup-languages-and-extensions "Permalink") GitLab 支持多種標記語言(有時稱為[輕量標記語言](https://en.wikipedia.org/wiki/Lightweight_markup_language) ),您可以將其用于存儲庫中文件的內容. 它們主要用于文檔目的. 只需為文件選擇正確的擴展名,GitLab 就會根據標記語言來渲染它們. | 標記語言 | Extensions | | --- | --- | | 純文本 | `txt` | | [Markdown](../../markdown.html) | `mdown`, `mkd`, `mkdn`, `md`, `markdown` | | [reStructuredText](https://docutils.sourceforge.io/rst.html) | `rst` | | [AsciiDoc](../../asciidoc.html) | `adoc`, `ad`, `asciidoc` | | [Textile](https://textile-lang.com/) | `textile` | | [rdoc](http://rdoc.sourceforge.net/doc/index.html) | `rdoc` | | [Org mode](https://orgmode.org/) | `org` | | [creole](http://www.wikicreole.org/) | `creole` | | [MediaWiki](https://www.mediawiki.org/wiki/MediaWiki) | `wiki`, `mediawiki` | ### Repository README and index files[](#repository-readme-and-index-files "Permalink") 當存儲庫中存在`README`或`index`文件時,它的內容將由 GitLab 自動預渲染,而無需打開它. 它們可以是純文本,也可以具有[受支持的標記語言](#supported-markup-languages-and-extensions)的擴展名: 有關優先級的一些注意事項: 1. 當`README`文件和`index`文件同時存在時, `README`文件將始終優先. 2. 如果存在多個具有不同擴展名的文件,則按字母順序排列,但不帶擴展名的文件例外,該擴展名始終優先. 例如, `README.adoc`將優先于`README.md` ,而`README.rst`將優先于`README` . ### Jupyter Notebook files[](#jupyter-notebook-files "Permalink") [Jupyter](https://jupyter.org/) Notebook(以前的 IPython Notebook)文件用于許多領域的交互式計算,并且包含用戶會話的完整記錄,并包括代碼,敘述性文本,方程式和豐富的輸出. [Read how to use Jupyter notebooks with GitLab.](jupyter_notebooks/index.html) ### OpenAPI viewer[](#openapi-viewer "Permalink") 在 GitLab 12.6 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/19515) . 如果文件名包含`openapi`或`swagger`且擴展名為`yaml` , `yml`或`json` ,則 GitLab 可以使用其文件查看器呈現 OpenAPI 規范文件. 以下示例都是正確的: * `openapi.yml` * `openapi.yaml` * `openapi.json` * `swagger.yml` * `swagger.yaml` * `swagger.json` * `gitlab_swagger.yml` * `openapi_gitlab.yml` * `OpenAPI.YML` * `openapi.Yaml` * `openapi.JSON` * `openapi.gitlab.yml` * `gitlab.openapi.yml` 然后,渲染它們: 1. 在 GitLab 的用戶界面中導航至存儲庫中的 OpenAPI 文件. 2. 單擊位于"顯示源"和"編輯"按鈕之間的"顯示 OpenAPI"按鈕(找到 OpenAPI 文件后,它將替換"顯示渲染的文件"按鈕). ## Branches[](#branches "Permalink") 有關詳細信息,請參見[分支](branches/index.html) . ## Commits[](#commits "Permalink") [提交更改時](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) ,您會將這些更改引入分支機構. 通過命令行,您可以在提交之前多次提交. * **提交消息:**提交消息對于標識正在更改的內容以及更重要的原因至關重要. 在 GitLab 中,您可以將關鍵字添加到提交消息中,以執行以下操作之一: * **觸發 GitLab CI / CD 管道:**如果您的項目配置有[GitLab CI / CD](../../../ci/README.html) ,則將在每次推送而不是每次提交時觸發一個管道. * **跳過管道:**您可以在提交消息中添加關鍵字[`[ci skip]`](../../../ci/yaml/README.html#skip-pipeline) ,GitLab CI / CD 將跳過該管道. * **交叉鏈接問題和合并請求:** [交叉鏈接](../issues/crosslinking_issues.html#from-commit-messages)非常適合跟蹤工作流程中與之相關的內容. 如果您在提交消息中提到問題或合并請求,它們將顯示在各自的線程上. * **櫻桃選擇提交:**在 GitLab 中,您可以直接從 UI [櫻桃選擇提交](../merge_requests/cherry_pick_changes.html#cherry-picking-a-commit) . * **還原提交:**輕松[將提交](../merge_requests/revert_changes.html#reverting-a-commit)從 UI [還原](../merge_requests/revert_changes.html#reverting-a-commit)到所選分支. * **簽署提交:**使用 GPG [簽署您的提交](gpg_signed_commits/index.html) . ## Project and repository size[](#project-and-repository-size "Permalink") 在項目的" **詳細信息"**頁面上報告項目的大小. 報告的大小最多每 15 分鐘更新一次,因此可能無法反映最近的活動. 顯示的文件大小包括存儲庫文件,工件和 LFS. 由于壓縮,內務處理和其他因素,每個項目的項目規模可能會略有不同. [儲存庫大小限制](../../admin_area/settings/account_and_limit_settings.html)可以由管理員設置. GitLab.com 的存儲庫大小限制[由 GitLab 設置](../../gitlab_com/index.html#repository-size-limit) . ## Contributors[](#contributors "Permalink") 代碼庫的所有貢獻者都顯示在項目的**設置>貢獻者下** . 它們是從協作者中以最少的提交次數排序的,并顯示在一個漂亮的圖形上: [![contributors to code](https://img.kancloud.cn/9f/8c/9f8c0e84bb75ce7026a10c2b940175ba_1439x687.png)](img/contributors_graph.png) ## Repository graph[](#repository-graph "Permalink") 存儲庫圖形以可視方式顯示存儲網絡的歷史記錄,包括分支和合并. 這可以幫助您可視化存儲庫中使用的 Git 流策略: [![repository Git flow](https://img.kancloud.cn/fb/79/fb793279388fd631e864dfaa2f1f30d3_1432x677.png)](img/repo_graph.png) 在您項目的**Repository> Graph**下找到它. ## Repository Languages[](#repository-languages "Permalink") 對于每個存儲庫的默認分支,GitLab 將確定使用了哪種編程語言,并將其顯示在項目頁面上. 如果缺少此信息,將在更新項目上的默認分支后添加. 此過程最多可能需要 5 分鐘. [![Repository Languages bar](https://img.kancloud.cn/bb/58/bb58aa3a34a5d6371640ef3085015d23_800x268.png)](img/repository_languages_v12_2.gif) Not all files are detected, among others; documentation, vendored code, and most markup languages are excluded. This behavior can be adjusted by overriding the default. For example, to enable `.proto` files to be detected, add the following to `.gitattributes` in the root of your repository. ``` *.proto linguist-detectable=true ``` ## Locked files[](#locked-files-premium "Permalink") 使用[文件鎖定](../file_lock.html)來鎖定文件,以防止發生任何沖突的更改. ## Repository’s API[](#repositorys-api "Permalink") 您可以通過[存儲庫 API](../../../api/repositories.html)訪問您的[存儲庫](../../../api/repositories.html) . ## Clone in Apple Xcode[](#clone-in-apple-xcode "Permalink") [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/45820) in GitLab 11.0 現在,可以使用位于用于克隆項目的 Git URL 旁邊的新的" **在 Xcode 中打開"**按鈕**在 Xcode 中**克隆包含`.xcodeproj`或`.xcworkspace`目錄的項目. 該按鈕僅在 macOS 上顯示. ## Download Source Code[](#download-source-code "Permalink") 在 GitLab 11.11 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/24704)了對目錄下載的支持. 可以從 UI 下載存儲在存儲庫中的源代碼. 單擊下載圖標,將打開一個下拉列表,其中包含下載以下內容的鏈接: [![Download source code](https://img.kancloud.cn/20/62/20626e566671a9050e8ba242a81f1af4_546x758.png)](img/download_source_code.png) * **源代碼:**允許用戶在他們當前正在查看的分支上下載源代碼. 可用擴展名: `zip` , `tar` , `tar.gz`和`tar.bz2` . * **目錄:**僅在查看子目錄時顯示. 這使用戶可以下載他們當前正在查看的特定目錄. 也可以在`zip` , `tar` , `tar.gz`和`tar.bz2` . * **工件:**允許用戶下載最新 CI 構建的工件.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看