Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-07 09:10:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-07 09:10:43 +0300
commita158bebe03b366b6463af181b9ee6f6c2b3850a3 (patch)
treeae65950cccfa3d99292a5c083df0cf786c74dd2b /doc
parent170765911848f0ad68e0f26f6413dd770d36f364 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/api/graphql/reference/index.md4
-rw-r--r--doc/ci/yaml/README.md16
-rw-r--r--doc/development/internal_api.md3
-rw-r--r--doc/development/usage_ping/dictionary.md12
-rw-r--r--doc/topics/git/numerous_undo_possibilities_in_git/index.md255
5 files changed, 128 insertions, 162 deletions
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index be5de5c86ac..28f91c7139e 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -3911,6 +3911,8 @@ Input type: `UpdateNamespacePackageSettingsInput`
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationupdatenamespacepackagesettingsclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
+| <a id="mutationupdatenamespacepackagesettingsgenericduplicateexceptionregex"></a>`genericDuplicateExceptionRegex` | [`UntrustedRegexp`](#untrustedregexp) | When generic_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect. |
+| <a id="mutationupdatenamespacepackagesettingsgenericduplicatesallowed"></a>`genericDuplicatesAllowed` | [`Boolean`](#boolean) | Indicates whether duplicate generic packages are allowed for this namespace. |
| <a id="mutationupdatenamespacepackagesettingsmavenduplicateexceptionregex"></a>`mavenDuplicateExceptionRegex` | [`UntrustedRegexp`](#untrustedregexp) | When maven_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect. |
| <a id="mutationupdatenamespacepackagesettingsmavenduplicatesallowed"></a>`mavenDuplicatesAllowed` | [`Boolean`](#boolean) | Indicates whether duplicate Maven packages are allowed for this namespace. |
| <a id="mutationupdatenamespacepackagesettingsnamespacepath"></a>`namespacePath` | [`ID!`](#id) | The namespace path where the namespace package setting is located. |
@@ -10488,6 +10490,8 @@ Namespace-level Package Registry settings.
| Name | Type | Description |
| ---- | ---- | ----------- |
+| <a id="packagesettingsgenericduplicateexceptionregex"></a>`genericDuplicateExceptionRegex` | [`UntrustedRegexp`](#untrustedregexp) | When generic_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect. |
+| <a id="packagesettingsgenericduplicatesallowed"></a>`genericDuplicatesAllowed` | [`Boolean!`](#boolean) | Indicates whether duplicate generic packages are allowed for this namespace. |
| <a id="packagesettingsmavenduplicateexceptionregex"></a>`mavenDuplicateExceptionRegex` | [`UntrustedRegexp`](#untrustedregexp) | When maven_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect. |
| <a id="packagesettingsmavenduplicatesallowed"></a>`mavenDuplicatesAllowed` | [`Boolean!`](#boolean) | Indicates whether duplicate Maven packages are allowed for this namespace. |
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index f815bfbc5a9..23cdce8187b 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -487,7 +487,7 @@ Use local includes instead of symbolic links.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to enable it. **(CORE ONLY)**
-You can use wildcard paths (`*`) with `include:local`.
+You can use wildcard paths (`*` and `**`) with `include:local`.
Example:
@@ -495,7 +495,19 @@ Example:
include: 'configs/*.yml'
```
-When the pipeline runs, it adds all `.yml` files in the `configs` folder into the pipeline configuration.
+When the pipeline runs, GitLab:
+
+- Adds all `.yml` files in the `configs` directory into the pipeline configuration.
+- Does not add `.yml` files in subfolders of the `configs` directory. To allow this,
+ add the following configuration:
+
+ ```yaml
+ # This matches all `.yml` files in `configs` and any subfolder in it.
+ include: 'configs/**.yml'
+
+ # This matches all `.yml` files only in subfolders of `configs`.
+ include: 'configs/**/*.yml'
+ ```
The wildcard file paths feature is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
diff --git a/doc/development/internal_api.md b/doc/development/internal_api.md
index 7cf740d16a0..57dd1c0a65b 100644
--- a/doc/development/internal_api.md
+++ b/doc/development/internal_api.md
@@ -453,7 +453,8 @@ metric counters.
| Attribute | Type | Required | Description |
|:----------|:-------|:---------|:------------|
-| `gitops_sync_count` | integer| yes | The number to increase the `gitops_sync_count` counter by |
+| `gitops_sync_count` | integer| no | The number to increase the `gitops_sync_count` counter by |
+| `k8s_api_proxy_request_count` | integer| no | The number to increase the `k8s_api_proxy_request_count` counter by |
```plaintext
POST /internal/kubernetes/usage_metrics
diff --git a/doc/development/usage_ping/dictionary.md b/doc/development/usage_ping/dictionary.md
index 8c60a768b46..80816bf583a 100644
--- a/doc/development/usage_ping/dictionary.md
+++ b/doc/development/usage_ping/dictionary.md
@@ -2902,6 +2902,18 @@ Status: `data_available`
Tiers: `premium`, `ultimate`
+### `counts.kubernetes_agent_k8s_api_proxy_request`
+
+Count of Kubernetes API proxy requests
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210505015532_kubernetes_agent_k8s_api_proxy_request.yml)
+
+Group: `group::configure`
+
+Status: `implemented`
+
+Tiers: `premium`, `ultimate`
+
### `counts.kubernetes_agents`
Count of Kubernetes agents
diff --git a/doc/topics/git/numerous_undo_possibilities_in_git/index.md b/doc/topics/git/numerous_undo_possibilities_in_git/index.md
index eb1c0a597f3..2426fa2f7cb 100644
--- a/doc/topics/git/numerous_undo_possibilities_in_git/index.md
+++ b/doc/topics/git/numerous_undo_possibilities_in_git/index.md
@@ -5,139 +5,134 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: howto
---
-# Numerous undo possibilities in Git **(FREE)**
+# Undo possibilities in Git **(FREE)**
-This tutorial shows you different ways of undoing your work in Git.
-We assume you have a basic working knowledge of Git. Check the GitLab
-[Git documentation](../index.md) for reference.
+[Nothing in Git is deleted](https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery),
+so when you work in Git, you can undo your work.
-We only provide some general information about the commands to get you started.
-For more advanced examples, refer to the [Git book](https://git-scm.com/book/en/v2).
+All version control systems have options for undoing work. However,
+because of the de-centralized nature of Git, these options are multiplied.
+The actions you take are based on the
+[stage of development](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository)
+you are in.
-A few different techniques exist to undo your changes, based on the stage
-of the change in your current development. Remember that
-[nothing in Git is really deleted](https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery).
-Until Git cleans detached commits - commits that cannot be accessed by branch or tag -
-you can view them with `git reflog` command, and access them with direct commit ID.
-Read more about [redoing the undo](#redoing-the-undo) in the section below.
+For more information about working with Git and GitLab:
-> For more information about working with Git and GitLab:
->
-> - <i class="fa fa-youtube-play youtube" aria-hidden="true"></i>&nbsp;Learn why [North Western Mutual chose GitLab](https://youtu.be/kPNMyxKRRoM) for their Enterprise source code management.
-> - Learn how to [get started with Git](https://about.gitlab.com/resources/whitepaper-moving-to-git/).
+- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i>&nbsp;Learn why [North Western Mutual chose GitLab](https://youtu.be/kPNMyxKRRoM) for their enterprise source code management.
+- Learn how to [get started with Git](https://about.gitlab.com/resources/whitepaper-moving-to-git/).
+- For more advanced examples, refer to the [Git book](https://git-scm.com/book/en/v2).
-## Introduction
+## When you can undo changes
-This guide is organized depending on the [stage of development](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository):
+In the standard Git workflow:
-- Where do you want to undo your changes from?
-- Were they shared with other developers?
+1. You create or edit a file. It starts in the unstaged state. If it's new, it is not yet tracked by Git.
+1. You add the file to your local repository (`git add`), which puts the file into the staged state.
+1. You commit the file to your local repository (`git commit`).
+1. You can then share the file with other developers, by committing to a remote repository (`git push`).
-Because Git tracks changes, a created or edited file is in the unstaged state
-(if created it is untracked by Git). After you add it to a repository (`git add`) you put
-a file into the **staged** state, which is then committed (`git commit`) to your
-local repository. After that, file can be shared with other developers (`git push`).
-This tutorial covers:
+You can undo changes at any point in this workflow:
-- [Undo local changes](#undo-local-changes) which were not pushed to a remote repository:
+- [When you're working locally](#undo-local-changes) and haven't yet pushed to a remote repository.
+- When you have already pushed to a remote repository and you want to:
+ - [Keep the history intact](#undo-remote-changes-without-changing-history) (preferred).
+ - [Change the history](#undo-remote-changes-with-modifying-history) (requires
+ coordination with team and force pushes).
- - Before you commit, in both unstaged and staged state.
- - After you committed.
+## Undo local changes
-- Undo changes after they are pushed to a remote repository:
+Until you push your changes to a remote repository, changes
+you make in Git are only in your local development environment.
- - [Without history modification](#undo-remote-changes-without-changing-history) (preferred way).
- - [With history modification](#undo-remote-changes-with-modifying-history) (requires
- coordination with team and force pushes).
- - [Use cases when modifying history is generally acceptable](#where-modifying-history-is-generally-acceptable).
- - [How to modify history](#how-modifying-history-is-done).
- - [How to remove sensitive information from repository](#deleting-sensitive-information-from-commits).
+### Undo unstaged local changes before you commit
-### Branching strategy
+When you make a change, but have not yet staged it, you can undo your work.
-[Git](https://git-scm.com/) is a de-centralized version control system. Beside regular
-versioning of the whole repository, it has possibilities to exchange changes
-with other repositories.
+1. Confirm that the file is unstaged (that you did not use `git add <file>`) by running `git status`:
-To avoid chaos with
-[multiple sources of truth](https://git-scm.com/about/distributed), various
-development workflows have to be followed. It depends on your internal
-workflow how certain changes or commits can be undone or changed.
+ ```shell
+ $ git status
+ On branch main
+ Your branch is up-to-date with 'origin/main'.
+ Changes not staged for commit:
+ (use "git add <file>..." to update what will be committed)
+ (use "git checkout -- <file>..." to discard changes in working directory)
-[GitLab Flow](https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/) provides a good
-balance between developers clashing with each other while
-developing the same feature and cooperating seamlessly. However, it does not enable
-joined development of the same feature by multiple developers by default.
+ modified: <file>
+ no changes added to commit (use "git add" and/or "git commit -a")
+ ```
-When multiple developers develop the same feature on the same branch, clashing
-with every synchronization is unavoidable. However, a proper or chosen Git Workflow
-prevents lost or out-of-sync data when the feature is complete.
+1. Choose an option and undo your changes:
-You can also
-read through this blog post on [Git Tips & Tricks](https://about.gitlab.com/blog/2016/12/08/git-tips-and-tricks/)
-to learn how to do things in Git.
+ - To overwrite local changes:
-## Undo local changes
+ ```shell
+ git checkout -- <file>
+ ```
-Until you push your changes to any remote repository, they only affect you.
-That broadens your options on how to handle undoing them. Still, local changes
-can be on various stages and each stage has a different approach on how to tackle them.
+ - To save local changes so you can [re-use them later](#quickly-save-local-changes):
-### Unstaged local changes (before you commit)
+ ```shell
+ git stash
+ ```
-When a change is made, but not added to the staged tree, Git
-proposes a solution to discard changes to the file.
+ - To discard local changes to all files, permanently:
-Suppose you edited a file to change the content using your favorite editor:
+ ```shell
+ git reset --hard
+ ```
-```shell
-vim <file>
-```
+### Undo staged local changes before you commit
-Because you did not `git add <file>` to staging, it should be under unstaged files (or
-untracked if file was created). You can confirm that with:
+If you added a file to staging, you can undo it.
-```shell
-$ git status
-On branch master
-Your branch is up-to-date with 'origin/master'.
-Changes not staged for commit:
- (use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
-
- modified: <file>
-no changes added to commit (use "git add" and/or "git commit -a")
-```
+1. Confirm that the file is staged (that you used `git add <file>`) by running `git status`:
-At this point there are 3 options to undo the local changes you have:
+ ```shell
+ $ git status
+ On branch main
+ Your branch is up-to-date with 'origin/main'.
+ Changes to be committed:
+ (use "git restore --staged <file>..." to unstage)
-- Discard all local changes, but save them for possible re-use [later](#quickly-save-local-changes):
+ new file: <file>
+ ```
- ```shell
- git stash
- ```
+1. Choose an option and undo your changes:
-- Discarding local changes (permanently) to a file:
+ - To unstage the file but keep your changes:
- ```shell
- git checkout -- <file>
- ```
+ ```shell
+ git restore --staged <file>
+ ```
-- Discard all local changes to all files permanently:
+ - To unstage everything but keep your changes:
- ```shell
- git reset --hard
- ```
+ ```shell
+ git reset
+ ```
+
+ - To unstage the file to current commit (HEAD):
+
+ ```shell
+ git reset HEAD <file>
+ ```
+
+ - To discard all local changes, but save them for [later](#quickly-save-local-changes):
+
+ ```shell
+ git stash
+ ```
+
+ - To discard everything permanently:
-Before executing `git reset --hard`, keep in mind that there is also a way to
-just temporary store the changes without committing them using `git stash`.
-This command resets the changes to all files, but it also saves them in case
-you would like to apply them at some later time. You can read more about it in
-[section below](#quickly-save-local-changes).
+ ```shell
+ git reset --hard
+ ```
### Quickly save local changes
-You are working on a feature when a boss drops by with an urgent task. Because your
+You are working on a feature when someone drops by with an urgent task. Because your
feature is not complete, but you need to swap to another branch, you can use
`git stash` to:
@@ -159,60 +154,7 @@ additional options like:
- `git stash pop`, which redoes previously stashed changes and removes them from stashed list
- `git stash apply`, which redoes previously stashed changes, but keeps them on stashed list
-### Staged local changes (before you commit)
-
-If you add some files to staging, but you want to remove them from the
-current commit while retaining those changes, move them outside
-of the staging tree. You can also discard all changes with
-`git reset --hard` or think about `git stash` [as described earlier.](#quickly-save-local-changes)
-
-Lets start the example by editing a file with your favorite editor to change the
-content and add it to staging:
-
-```shell
-vim <file>
-git add <file>
-```
-
-The file is now added to staging as confirmed by `git status` command:
-
-```shell
-$ git status
-On branch master
-Your branch is up-to-date with 'origin/master'.
-Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
-
- new file: <file>
-```
-
-Now you have 4 options to undo your changes:
-
-- Unstage the file to current commit (HEAD):
-
- ```shell
- git reset HEAD <file>
- ```
-
-- Unstage everything - retain changes:
-
- ```shell
- git reset
- ```
-
-- Discard all local changes, but save them for [later](#quickly-save-local-changes):
-
- ```shell
- git stash
- ```
-
-- Discard everything permanently:
-
- ```shell
- git reset --hard
- ```
-
-## Committed local changes
+## Undo committed local changes
After you commit, your changes are recorded by the version control system.
Because you haven't pushed to your remote repository yet, your changes are
@@ -289,6 +231,9 @@ these options to remove all or part of it from our repository:
### With history modification
+You can rewrite history in Git, but you should avoid it, because it can cause problems
+when multiple developers are contributing to the same codebase.
+
There is one command for history modification and that is `git rebase`. Command
provides interactive mode (`-i` flag) which enables you to:
@@ -335,7 +280,7 @@ In case you want to modify something introduced in commit `B`.
You can find some more examples in the section explaining
[how to modify history](#how-modifying-history-is-done).
-### Redoing the Undo
+### Redoing the undo
Sometimes you realize that the changes you undid were useful and you want them
back. Well because of first paragraph you are in luck. Command `git reflog`
@@ -501,14 +446,6 @@ feature set as `git filter-branch` does, but focus on specific use cases.
Refer [Reduce repository size](../../../user/project/repository/reducing_the_repo_size_using_git.md) page to know more about purging files from repository history & GitLab storage.
-## Conclusion
-
-Various options exist for undoing your work with any version control system, but
-because of the de-centralized nature of Git, these options are multiplied (or limited)
-depending on the stage of your process. Git also enables rewriting history, but that
-should be avoided as it might cause problems when multiple developers are
-contributing to the same codebase.
-
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues