diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-20 00:23:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-20 00:23:20 +0300 |
commit | ec2d2ecdf734e48f6603c90aea01abc67c6bb293 (patch) | |
tree | dffc3ea9b5e771785f4e9cc712a68aff76b9079e /doc | |
parent | 39406b41a6f3178feea7153bb2ce7343bc193e93 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ci/cloud_services/azure/index.md | 2 | ||||
-rw-r--r-- | doc/ci/quick_start/tutorial.md | 2 | ||||
-rw-r--r-- | doc/development/internal_analytics/internal_event_instrumentation/migration.md | 1 | ||||
-rw-r--r-- | doc/gitlab-basics/start-using-git.md | 71 | ||||
-rw-r--r-- | doc/topics/git/useful_git_commands.md | 104 | ||||
-rw-r--r-- | doc/tutorials/make_first_git_commit/index.md | 2 | ||||
-rw-r--r-- | doc/tutorials/update_commit_messages/index.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/code_suggestions/index.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/code_suggestions/saas.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/code_suggestions/self_managed.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/code_suggestions/troubleshooting.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/index.md | 6 | ||||
-rw-r--r-- | doc/user/project/repository/mirror/push.md | 2 |
13 files changed, 77 insertions, 123 deletions
diff --git a/doc/ci/cloud_services/azure/index.md b/doc/ci/cloud_services/azure/index.md index d3bd8e187ba..b3fcaabfdde 100644 --- a/doc/ci/cloud_services/azure/index.md +++ b/doc/ci/cloud_services/azure/index.md @@ -153,7 +153,7 @@ you should verify: - For the `gitlab-group/gitlab-project` project and `main` branch it would be: `project_path:gitlab-group/gitlab-project:ref_type:branch:ref:main`. - The correct values of `mygroup` and `myproject` can be retrieved by checking the URL - when accessing your GitLab project or by selecting the **Clone** option in the project. + when accessing your GitLab project or, in the upper-right corner of the project's overview page, selecting **Code**. - The `Audience` defined in the Azure AD federated identity credentials, for example `https://gitlab.com` or your own GitLab URL. diff --git a/doc/ci/quick_start/tutorial.md b/doc/ci/quick_start/tutorial.md index 389309538e9..413eb0f16ee 100644 --- a/doc/ci/quick_start/tutorial.md +++ b/doc/ci/quick_start/tutorial.md @@ -45,7 +45,7 @@ on GitLab.com: - In the **Project name** field, enter the name of your project, for example `My Pipeline Tutorial Project`. - Select **Initialize repository with a README**. 1. Select **Create project**. -1. On the right of the **Project Overview** page for your project, select **Clone** +1. On the project's overview page, in the upper-right corner, select **Code** to find the clone paths for your project. Copy the SSH or HTTP path and use the path to clone the project locally. diff --git a/doc/development/internal_analytics/internal_event_instrumentation/migration.md b/doc/development/internal_analytics/internal_event_instrumentation/migration.md index 2ef439e21e9..79ca45ed84c 100644 --- a/doc/development/internal_analytics/internal_event_instrumentation/migration.md +++ b/doc/development/internal_analytics/internal_event_instrumentation/migration.md @@ -125,6 +125,7 @@ To start using Internal Events Tracking, follow these steps: 1. Create an event definition that describes `git_write_action` ([guide](event_definition_guide.md)). 1. Find metric definitions that list `git_write_action` in the events section (`20210216182041_action_monthly_active_users_git_write.yml` and `20210216184045_git_write_action_weekly.yml`). 1. Change the `data_source` from `redis_hll` to `internal_events` in the metric definition files. +1. Remove the `instrumentation_class` property. It's not used for Internal Events metrics. 1. Add an `events` section to both metric definition files. ```yaml diff --git a/doc/gitlab-basics/start-using-git.md b/doc/gitlab-basics/start-using-git.md index ecdc4aeed06..a1dd99d811f 100644 --- a/doc/gitlab-basics/start-using-git.md +++ b/doc/gitlab-basics/start-using-git.md @@ -117,7 +117,7 @@ Clone with SSH when you want to authenticate only one time. 1. Authenticate with GitLab by following the instructions in the [SSH documentation](../user/ssh.md). 1. On the left sidebar, select **Search or go to** and find the project you want to clone. -1. On the right-hand side of the page, select **Clone**, then copy the URL for **Clone with SSH**. +1. On the project's overview page, in the upper-right corner, select **Code**, then copy the URL for **Clone with SSH**. 1. Open a terminal and go to the directory where you want to clone the files. Git automatically creates a folder with the repository name and downloads the files there. 1. Run this command: @@ -142,7 +142,7 @@ between your computer and GitLab. [OAuth credential helpers](../user/profile/account/two_factor_authentication.md#oauth-credential-helpers) can decrease the number of times you must manually authenticate, making HTTPS a seamless experience. 1. On the left sidebar, select **Search or go to** and find the project you want to clone. -1. On the right-hand side of the page, select **Clone**, then copy the URL for **Clone with HTTPS**. +1. On the project's overview page, in the upper-right corner, select **Code**, then copy the URL for **Clone with HTTPS**. 1. Open a terminal and go to the directory where you want to clone the files. 1. Run the following command. Git automatically creates a folder with the repository name and downloads the files there. @@ -255,6 +255,47 @@ existing branch. You can create additional named remotes and branches as necessa You can learn more on how Git manages remote repositories in the [Git Remote documentation](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes). +## Add another URL to a remote + +Add another URL to a remote, so both remotes get updated on each push: + +```shell +git remote set-url --add <remote_name> <remote_url> +``` + +## Show the log of reference changes to HEAD + +```shell +git reflog +``` + +## Check the Git history of a file + +The basic command to check the Git history of a file: + +```shell +git log <file> +``` + +If you get this error message: + +```plaintext +fatal: ambiguous argument <file_name>: unknown revision or path not in the working tree. +Use '--' to separate paths from revisions, like this: +``` + +Use this to check the Git history of the file: + +```shell +git log -- <file> +``` + +## Check the content of each change to a file + +```shell +gitk <file> +``` + ## Branches A **branch** is a copy of the files in the repository at the time you create the branch. @@ -423,6 +464,20 @@ In GitLab, you typically use a [merge request](../user/project/merge_requests/in To create a merge request from a fork to an upstream repository, see the [forking workflow](../user/project/repository/forking_workflow.md). +## Reuse recorded resolutions + +To _reuse_ recorded resolutions: + +```shell +git rerere +``` + +To enable `rerere` functionality: + +```shell +git config --global rerere.enabled true +``` + ## Advanced use of Git through the command line For an introduction of more advanced Git techniques, see [Git rebase, force-push, and merge conflicts](../topics/git/git_rebase.md). @@ -439,15 +494,3 @@ changes from the original repository. It is common to call this remote repositor You can now use the `upstream` as a [`<remote>` to `pull` new updates](#download-the-latest-changes-in-the-project) from the original repository, and use the `origin` to [push local changes](#send-changes-to-gitlab) and create merge requests. - -<!-- ## Troubleshooting - -Include any troubleshooting steps that you can foresee. If you know beforehand what issues -one might have when setting this up, or when something is changed, or on upgrading, it's -important to describe those, too. Think of things that may go wrong and include them here. -This is important to minimize requests for support, and to avoid doc comments with -questions that you know someone might ask. - -Each scenario can be a third-level heading, for example `### Getting error message X`. -If you have none to add when creating a doc, leave this section in place -but commented out to help encourage others to add to it in the future. --> diff --git a/doc/topics/git/useful_git_commands.md b/doc/topics/git/useful_git_commands.md index a397ec749d0..54a877bd974 100644 --- a/doc/topics/git/useful_git_commands.md +++ b/doc/topics/git/useful_git_commands.md @@ -1,101 +1,11 @@ --- -stage: Create -group: Source Code -info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments" +redirect_to: 'index.md' +remove_date: '2024-03-19' --- -# Frequently used Git commands **(FREE ALL)** +This document was moved to [another location](index.md). -The following commands are frequently used. - -## Add another URL to a remote - -Add another URL to a remote, so both remotes get updated on each push: - -```shell -git remote set-url --add <remote_name> <remote_url> -``` - -## Refs and Log - -### Use reflog to show the log of reference changes to HEAD - -```shell -git reflog -``` - -### Check the Git history of a file - -The basic command to check the Git history of a file: - -```shell -git log <file> -``` - -If you get this error message: - -```plaintext -fatal: ambiguous argument <file_name>: unknown revision or path not in the working tree. -Use '--' to separate paths from revisions, like this: -``` - -Use this to check the Git history of the file: - -```shell -git log -- <file> -``` - -### Check the content of each change to a file - -```shell -gitk <file> -``` - -### Check the content of each change to a file, follows it past file renames - -```shell -gitk --follow <file> -``` - -## Rebasing - -### Rebase your branch onto the default - -The `-i` flag stands for 'interactive'. Replace `<default-branch>` with the name -of your [default branch](../../user/project/repository/branches/default.md): - -```shell -git rebase -i <default-branch> -``` - -### Continue the rebase if paused - -```shell -git rebase --continue -``` - -### Use `git rerere` - -To _reuse_ recorded solutions to the same problems when repeated: - -```shell -git rerere -``` - -To enable `rerere` functionality: - -```shell -git config --global rerere.enabled true -``` - -<!-- ## Troubleshooting - -Include any troubleshooting steps that you can foresee. If you know beforehand what issues -one might have when setting this up, or when something is changed, or on upgrading, it's -important to describe those, too. Think of things that may go wrong and include them here. -This is important to minimize requests for support, and to avoid doc comments with -questions that you know someone might ask. - -Each scenario can be a third-level heading, for example `### Getting error message X`. -If you have none to add when creating a doc, leave this section in place -but commented out to help encourage others to add to it in the future. --> +<!-- This redirect file can be deleted after <2024-03-19>. --> +<!-- Redirects that point to other docs in the same project expire in three months. --> +<!-- Redirects that point to docs in a different project or site (for example, link is not relative and starts with `https:`) expire in one year. --> +<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html --> diff --git a/doc/tutorials/make_first_git_commit/index.md b/doc/tutorials/make_first_git_commit/index.md index 1663fa08ad6..e80cd6770d0 100644 --- a/doc/tutorials/make_first_git_commit/index.md +++ b/doc/tutorials/make_first_git_commit/index.md @@ -93,7 +93,7 @@ To start, create a sample project in GitLab. Now you can clone the repository in your project. *Cloning* a repository means you're creating a copy on your computer, or wherever you want to store and work with the files. -1. On your project page, select **Clone**. Copy the URL for **Clone with SSH**. +1. On your project's overview page, in the upper-right corner, select **Code**, then copy the URL for **Clone with SSH**. ![Clone a project with SSH](img/clone_project_v14_9.png) diff --git a/doc/tutorials/update_commit_messages/index.md b/doc/tutorials/update_commit_messages/index.md index 0228b33e3de..36106dd4f98 100644 --- a/doc/tutorials/update_commit_messages/index.md +++ b/doc/tutorials/update_commit_messages/index.md @@ -53,7 +53,7 @@ disabled to authenticate from the CLI. Alternatively, you can [use an SSH key to The first step is to get a clone of the repository on your local machine: -1. In GitLab, on your project's overview page, on the top right, select **Clone**. +1. In GitLab, on your project's overview page, in the upper-right corner, select **Code**. 1. In the dropdown list, copy the URL for your repository by selecting **{copy-to-clipboard}** next to: - **Clone with HTTPS** if your GitLab account uses basic username and password authentication. - **Clone with SSH** if you use SSH to authenticate with GitLab. diff --git a/doc/user/project/repository/code_suggestions/index.md b/doc/user/project/repository/code_suggestions/index.md index 785c82d96fc..61b6d3724cd 100644 --- a/doc/user/project/repository/code_suggestions/index.md +++ b/doc/user/project/repository/code_suggestions/index.md @@ -4,7 +4,7 @@ group: Code Creation info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Code Suggestions **(FREE ALL BETA)** +# Code Suggestions **(FREE ALL)** > - [Introduced support for Google Vertex AI Codey APIs](https://gitlab.com/groups/gitlab-org/-/epics/10562) in GitLab 16.1. > - [Removed support for GitLab native model](https://gitlab.com/groups/gitlab-org/-/epics/10752) in GitLab 16.2. diff --git a/doc/user/project/repository/code_suggestions/saas.md b/doc/user/project/repository/code_suggestions/saas.md index 1af5eef585c..52b023445d5 100644 --- a/doc/user/project/repository/code_suggestions/saas.md +++ b/doc/user/project/repository/code_suggestions/saas.md @@ -4,7 +4,7 @@ group: Code Creation info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Code Suggestions on GitLab SaaS **(FREE SAAS BETA)** +# Code Suggestions on GitLab SaaS **(FREE SAAS)** > - [Introduced](https://about.gitlab.com/releases/2023/02/22/gitlab-15-9-released/#code-suggestions-available-in-closed-beta) in GitLab 15.9 as [Beta](../../../../policy/experiment-beta-support.md#beta) for early access Ultimate customers on GitLab.com. > - [Enabled](https://gitlab.com/gitlab-org/gitlab/-/issues/408104) as opt-in with GitLab 15.11 as [Beta](../../../../policy/experiment-beta-support.md#beta). diff --git a/doc/user/project/repository/code_suggestions/self_managed.md b/doc/user/project/repository/code_suggestions/self_managed.md index 26850bc8b5f..8c3c4aadc71 100644 --- a/doc/user/project/repository/code_suggestions/self_managed.md +++ b/doc/user/project/repository/code_suggestions/self_managed.md @@ -4,7 +4,7 @@ group: Code Creation info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Code Suggestions on self-managed GitLab **(SELF BETA)** +# Code Suggestions on self-managed GitLab **(SELF)** > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10653) in GitLab 16.1 as [Beta](../../../../policy/experiment-beta-support.md#beta) on self-managed GitLab. > - [Introduced support for Google Vertex AI Codey APIs](https://gitlab.com/groups/gitlab-org/-/epics/10562) in GitLab 16.1. diff --git a/doc/user/project/repository/code_suggestions/troubleshooting.md b/doc/user/project/repository/code_suggestions/troubleshooting.md index c18ea2dd26b..22398395c2c 100644 --- a/doc/user/project/repository/code_suggestions/troubleshooting.md +++ b/doc/user/project/repository/code_suggestions/troubleshooting.md @@ -4,7 +4,7 @@ group: Code Creation info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Troubleshooting Code Suggestions **(FREE ALL BETA)** +# Troubleshooting Code Suggestions **(FREE ALL)** When working with GitLab Duo Code Suggestions, you might encounter the following issues. diff --git a/doc/user/project/repository/index.md b/doc/user/project/repository/index.md index dd8ee61f6ae..b2a14dcc3cf 100644 --- a/doc/user/project/repository/index.md +++ b/doc/user/project/repository/index.md @@ -85,7 +85,7 @@ Projects that contain a `.xcodeproj` or `.xcworkspace` directory can be cloned into Xcode on macOS. 1. From the GitLab UI, go to the project's overview page. -1. Select **Clone**. +1. In the upper-right corner, select **Code**. 1. Select **Xcode**. The project is cloned onto your computer and you are @@ -101,7 +101,7 @@ Visual Studio Code: - From the GitLab interface: 1. Go to the project's overview page. - 1. Select **Clone**. + 1. In the upper-right corner, select **Code**. 1. Under **Open in your IDE**, select **Visual Studio Code (SSH)** or **Visual Studio Code (HTTPS)**. 1. Select a folder to clone the project into. @@ -121,7 +121,7 @@ Prerequisites: To do this: 1. Go to the project's overview page. -1. Select **Clone**. +1. In the upper-right corner, select **Code**. 1. Under **Open in your IDE**, select **IntelliJ IDEA (SSH)** or **IntelliJ IDEA (HTTPS)**. ## Download the code in a repository diff --git a/doc/user/project/repository/mirror/push.md b/doc/user/project/repository/mirror/push.md index 3aa4c768ebe..babe99441ef 100644 --- a/doc/user/project/repository/mirror/push.md +++ b/doc/user/project/repository/mirror/push.md @@ -161,7 +161,7 @@ To set up a mirror from GitLab to AWS CodeCommit: 1. Copy or download the special Git HTTPS user ID and password. 1. In the AWS CodeCommit console, create a new repository to mirror from your GitLab repository. -1. Open your new repository, and then select **Clone URL > Clone HTTPS** (not **Clone HTTPS (GRC)**). +1. Open your new repository, in the upper-right corner, select **Code > Clone HTTPS** (not **Clone HTTPS (GRC)**). 1. In GitLab, open the repository to be push-mirrored. 1. Select **Settings > Repository**, and then expand **Mirroring repositories**. 1. Fill in the **Git repository URL** field using this format, replacing |