Skip to content
Snippets Groups Projects
Commit b0be58a1 authored by Brett Walker's avatar Brett Walker Committed by Sean McGivern
Browse files

Resolve "CE documentation is not CommonMark compliant"

parent 2d16f479
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Showing
with 336 additions and 314 deletions
Loading
@@ -50,16 +50,16 @@ that are in common for all providers that we need to consider.
Loading
@@ -50,16 +50,16 @@ that are in common for all providers that we need to consider.
be blocked by default and will have to be unblocked by an administrator before be blocked by default and will have to be unblocked by an administrator before
they are able to sign in. they are able to sign in.
   
>**Note:** > **Note:**
If you set `block_auto_created_users` to `false`, make sure to only > If you set `block_auto_created_users` to `false`, make sure to only
define providers under `allow_single_sign_on` that you are able to control, like > define providers under `allow_single_sign_on` that you are able to control, like
SAML, Shibboleth, Crowd or Google, or set it to `false` otherwise any user on > SAML, Shibboleth, Crowd or Google, or set it to `false` otherwise any user on
the Internet will be able to successfully sign in to your GitLab without > the Internet will be able to successfully sign in to your GitLab without
administrative approval. > administrative approval.
>
>**Note:** > **Note:**
`auto_link_ldap_user` requires the `uid` of the user to be the same in both LDAP > `auto_link_ldap_user` requires the `uid` of the user to be the same in both LDAP
and the OmniAuth provider. > and the OmniAuth provider.
   
To change these settings: To change these settings:
   
Loading
@@ -233,15 +233,15 @@ You can enable profile syncing from selected OmniAuth providers and for all or f
Loading
@@ -233,15 +233,15 @@ You can enable profile syncing from selected OmniAuth providers and for all or f
   
When authenticating using LDAP, the user's email is always synced. When authenticating using LDAP, the user's email is always synced.
   
```ruby ```ruby
gitlab_rails['sync_profile_from_provider'] = ['twitter', 'google_oauth2'] gitlab_rails['sync_profile_from_provider'] = ['twitter', 'google_oauth2']
gitlab_rails['sync_profile_attributes'] = ['name', 'email', 'location'] gitlab_rails['sync_profile_attributes'] = ['name', 'email', 'location']
``` ```
   
**For installations from source** **For installations from source**
   
```yaml ```yaml
omniauth: omniauth:
sync_profile_from_provider: ['twitter', 'google_oauth2'] sync_profile_from_provider: ['twitter', 'google_oauth2']
sync_profile_attributes: ['email', 'location'] sync_profile_attributes: ['email', 'location']
``` ```
Loading
@@ -123,9 +123,10 @@ in your SAML IdP:
Loading
@@ -123,9 +123,10 @@ in your SAML IdP:
To ease configuration, most IdP accept a metadata URL for the application to provide To ease configuration, most IdP accept a metadata URL for the application to provide
configuration information to the IdP. To build the metadata URL for GitLab, append configuration information to the IdP. To build the metadata URL for GitLab, append
`users/auth/saml/metadata` to the HTTPS URL of your GitLab installation, for instance: `users/auth/saml/metadata` to the HTTPS URL of your GitLab installation, for instance:
```
https://gitlab.example.com/users/auth/saml/metadata ```
``` https://gitlab.example.com/users/auth/saml/metadata
```
   
At a minimum the IdP *must* provide a claim containing the user's email address, using At a minimum the IdP *must* provide a claim containing the user's email address, using
claim name `email` or `mail`. The email will be used to automatically generate the GitLab claim name `email` or `mail`. The email will be used to automatically generate the GitLab
Loading
Loading
Loading
@@ -41,10 +41,9 @@ Here's what we'll cover in this tutorial:
Loading
@@ -41,10 +41,9 @@ Here's what we'll cover in this tutorial:
- [Without history modification](#undo-remote-changes-without-changing-history) (preferred way) - [Without history modification](#undo-remote-changes-without-changing-history) (preferred way)
- [With history modification](#undo-remote-changes-with-modifying-history) (requires - [With history modification](#undo-remote-changes-with-modifying-history) (requires
coordination with team and force pushes). coordination with team and force pushes).
- [Usecases when modifying history is generally acceptable](#where-modifying-history-is-generally-acceptable)
- [Usecases when modifying history is generally acceptable](#where-modifying-history-is-generally-acceptable) - [How to modify history](#how-modifying-history-is-done)
- [How to modify history](#how-modifying-history-is-done) - [How to remove sensitive information from repository](#deleting-sensitive-information-from-commits)
- [How to remove sensitive information from repository](#deleting-sensitive-information-from-commits)
   
   
### Branching strategy ### Branching strategy
Loading
@@ -101,24 +100,23 @@ no changes added to commit (use "git add" and/or "git commit -a")
Loading
@@ -101,24 +100,23 @@ no changes added to commit (use "git add" and/or "git commit -a")
   
At this point there are 3 options to undo the local changes you have: At this point there are 3 options to undo the local changes you have:
   
- Discard all local changes, but save them for possible re-use [later](#quickly-save-local-changes) - Discard all local changes, but save them for possible re-use [later](#quickly-save-local-changes)
```shell
git stash
```
   
- Discarding local changes (permanently) to a file ```shell
git stash
```
   
```shell - Discarding local changes (permanently) to a file
git checkout -- <file>
```
   
- Discard all local changes to all files permanently ```shell
git checkout -- <file>
```
   
```shell - Discard all local changes to all files permanently
git reset --hard
```
   
```shell
git reset --hard
```
   
Before executing `git reset --hard`, keep in mind that there is also a way to 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`. just temporary store the changes without committing them using `git stash`.
Loading
@@ -140,10 +138,10 @@ them. This is achieved by Git stashing command `git stash`, which in fact saves
Loading
@@ -140,10 +138,10 @@ them. This is achieved by Git stashing command `git stash`, which in fact saves
current work and runs `git reset --hard`, but it also has various current work and runs `git reset --hard`, but it also has various
additional options like: additional options like:
   
- `git stash save`, which enables including temporary commit message, which will help you identify changes, among with other options - `git stash save`, which enables including temporary commit message, which will help you identify changes, among with other options
- `git stash list`, which lists all previously stashed commits (yes, there can be more) that were not `pop`ed - `git stash list`, which lists all previously stashed commits (yes, there can be more) that were not `pop`ed
- `git stash pop`, which redoes previously stashed changes and removes them from stashed list - `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 - `git stash apply`, which redoes previously stashed changes, but keeps them on stashed list
   
### Staged local changes (before you commit) ### Staged local changes (before you commit)
   
Loading
@@ -174,29 +172,29 @@ Changes to be committed:
Loading
@@ -174,29 +172,29 @@ Changes to be committed:
   
Now you have 4 options to undo your changes: Now you have 4 options to undo your changes:
   
- Unstage the file to current commit (HEAD) - Unstage the file to current commit (HEAD)
   
```shell ```shell
git reset HEAD <file> git reset HEAD <file>
``` ```
   
- Unstage everything - retain changes - Unstage everything - retain changes
   
```shell ```shell
git reset git reset
``` ```
   
- Discard all local changes, but save them for [later](#quickly-save-local-changes) - Discard all local changes, but save them for [later](#quickly-save-local-changes)
   
```shell ```shell
git stash git stash
``` ```
   
- Discard everything permanently - Discard everything permanently
   
```shell ```shell
git reset --hard git reset --hard
``` ```
   
## Committed local changes ## Committed local changes
   
Loading
@@ -232,42 +230,42 @@ In our example we will end up with commit `B`, that introduced bug/error. We hav
Loading
@@ -232,42 +230,42 @@ In our example we will end up with commit `B`, that introduced bug/error. We hav
   
- Undo (swap additions and deletions) changes introduced by commit `B`. - Undo (swap additions and deletions) changes introduced by commit `B`.
   
```shell ```shell
git revert commit-B-id git revert commit-B-id
``` ```
   
- Undo changes on a single file or directory from commit `B`, but retain them in the staged state - Undo changes on a single file or directory from commit `B`, but retain them in the staged state
   
```shell ```shell
git checkout commit-B-id <file> git checkout commit-B-id <file>
``` ```
   
- Undo changes on a single file or directory from commit `B`, but retain them in the unstaged state - Undo changes on a single file or directory from commit `B`, but retain them in the unstaged state
   
```shell ```shell
git reset commit-B-id <file> git reset commit-B-id <file>
``` ```
- There is one command we also must not forget: **creating a new branch** - There is one command we also must not forget: **creating a new branch**
from the point where changes are not applicable or where the development has hit a from the point where changes are not applicable or where the development has hit a
dead end. For example you have done commits `A-B-C-D` on your feature-branch dead end. For example you have done commits `A-B-C-D` on your feature-branch
and then you figure `C` and `D` are wrong. At this point you either reset to `B` and then you figure `C` and `D` are wrong. At this point you either reset to `B`
and do commit `F` (which will cause problems with pushing and if forced pushed also with other developers) and do commit `F` (which will cause problems with pushing and if forced pushed also with other developers)
since branch now looks `A-B-F`, which clashes with what other developers have locally (you will since branch now looks `A-B-F`, which clashes with what other developers have locally (you will
[change history](#with-history-modification)), or you simply checkout commit `B` create [change history](#with-history-modification)), or you simply checkout commit `B` create
a new branch and do commit `F`. In the last case, everyone else can still do their work while you a new branch and do commit `F`. In the last case, everyone else can still do their work while you
have your new way to get it right and merge it back in later. Alternatively, with GitLab, have your new way to get it right and merge it back in later. Alternatively, with GitLab,
you can [cherry-pick](../../../user/project/merge_requests/cherry_pick_changes.md#cherry-picking-a-commit) you can [cherry-pick](../../../user/project/merge_requests/cherry_pick_changes.md#cherry-picking-a-commit)
that commit into a new merge request. that commit into a new merge request.
![Create a new branch to avoid clashing](img/branching.png) ![Create a new branch to avoid clashing](img/branching.png)
```shell ```shell
git checkout commit-B-id git checkout commit-B-id
git checkout -b new-path-of-feature git checkout -b new-path-of-feature
# Create <commit F> # Create <commit F>
git commit -a git commit -a
``` ```
   
### With history modification ### With history modification
   
Loading
@@ -287,9 +285,9 @@ delete commit `B`.
Loading
@@ -287,9 +285,9 @@ delete commit `B`.
   
- Rebase the range from current commit D to A: - Rebase the range from current commit D to A:
   
```shell ```shell
git rebase -i A git rebase -i A
``` ```
   
- Command opens your favorite editor where you write `drop` in front of commit - Command opens your favorite editor where you write `drop` in front of commit
`B`, but you leave default `pick` with all other commits. Save and exit the `B`, but you leave default `pick` with all other commits. Save and exit the
Loading
Loading
Loading
@@ -73,10 +73,10 @@ The curriculum is composed of GitLab videos, screencasts, presentations, project
Loading
@@ -73,10 +73,10 @@ The curriculum is composed of GitLab videos, screencasts, presentations, project
#### 1.7 Community and Support #### 1.7 Community and Support
   
1. [Getting Help](https://about.gitlab.com/getting-help/) 1. [Getting Help](https://about.gitlab.com/getting-help/)
- Proposing Features and Reporting and Tracking bugs for GitLab - Proposing Features and Reporting and Tracking bugs for GitLab
- The GitLab IRC channel, Gitter Chat Room, Community Forum and Mailing List - The GitLab IRC channel, Gitter Chat Room, Community Forum and Mailing List
- Getting Technical Support - Getting Technical Support
- Being part of our Great Community and Contributing to GitLab - Being part of our Great Community and Contributing to GitLab
1. [Getting Started with the GitLab Development Kit (GDK)](https://about.gitlab.com/2016/06/08/getting-started-with-gitlab-development-kit/) 1. [Getting Started with the GitLab Development Kit (GDK)](https://about.gitlab.com/2016/06/08/getting-started-with-gitlab-development-kit/)
1. [Contributing Technical Articles to the GitLab Blog](https://about.gitlab.com/2016/01/26/call-for-writers/) 1. [Contributing Technical Articles to the GitLab Blog](https://about.gitlab.com/2016/01/26/call-for-writers/)
1. [GitLab Training Workshops](https://docs.gitlab.com/ce/university/training/end-user/) 1. [GitLab Training Workshops](https://docs.gitlab.com/ce/university/training/end-user/)
Loading
Loading
Loading
@@ -395,5 +395,5 @@ some redundancy options but it might also imply Geographic replication.
Loading
@@ -395,5 +395,5 @@ some redundancy options but it might also imply Geographic replication.
There is a lot of ground yet to cover so have a read through these other There is a lot of ground yet to cover so have a read through these other
resources and feel free to open an issue to request additional material. resources and feel free to open an issue to request additional material.
   
* [GitLab High Availability](http://docs.gitlab.com/ce/administration/high_availability/README.html#sts=High Availability) * [GitLab High Availability](http://docs.gitlab.com/ce/administration/high_availability/README.html#sts=High%20Availability)
* [GitLab Geo](http://docs.gitlab.com/ee/gitlab-geo/README.html) * [GitLab Geo](http://docs.gitlab.com/ee/gitlab-geo/README.html)
Loading
@@ -55,13 +55,13 @@ Sometimes we need to upgrade customers from old versions of GitLab to latest, so
Loading
@@ -55,13 +55,13 @@ Sometimes we need to upgrade customers from old versions of GitLab to latest, so
- Keep this up-to-date as patch and version releases become available, just like our customers would - Keep this up-to-date as patch and version releases become available, just like our customers would
- Try out the following installation path - Try out the following installation path
- [Install GitLab 4.2 from source](https://gitlab.com/gitlab-org/gitlab-ce/blob/d67117b5a185cfb15a1d7e749588ff981ffbf779/doc/install/installation.md) - [Install GitLab 4.2 from source](https://gitlab.com/gitlab-org/gitlab-ce/blob/d67117b5a185cfb15a1d7e749588ff981ffbf779/doc/install/installation.md)
- External MySQL database - External MySQL database
- External NGINX - External NGINX
- Create some test data - Create some test data
- Populated Repos - Populated Repos
- Users - Users
- Groups - Groups
- Projects - Projects
- [Backup using our Backup rake task](https://docs.gitlab.com/ce/raketasks/backup_restore.html#create-a-backup-of-the-gitlab-system) - [Backup using our Backup rake task](https://docs.gitlab.com/ce/raketasks/backup_restore.html#create-a-backup-of-the-gitlab-system)
- [Upgrade to 5.0 source using our Upgrade documentation](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/4.2-to-5.0.md) - [Upgrade to 5.0 source using our Upgrade documentation](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/4.2-to-5.0.md)
- [Upgrade to 5.1 source](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/5.0-to-5.1.md) - [Upgrade to 5.1 source](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/5.0-to-5.1.md)
Loading
@@ -72,7 +72,7 @@ Sometimes we need to upgrade customers from old versions of GitLab to latest, so
Loading
@@ -72,7 +72,7 @@ Sometimes we need to upgrade customers from old versions of GitLab to latest, so
- [Upgrade to Omnibus 7.14](https://docs.gitlab.com/omnibus/update/README.html#upgrading-from-a-non-omnibus-installation-to-an-omnibus-installation) - [Upgrade to Omnibus 7.14](https://docs.gitlab.com/omnibus/update/README.html#upgrading-from-a-non-omnibus-installation-to-an-omnibus-installation)
- [Restore backup using our Restore rake task](https://docs.gitlab.com/ce/raketasks/backup_restore.html#restore-a-previously-created-backup) - [Restore backup using our Restore rake task](https://docs.gitlab.com/ce/raketasks/backup_restore.html#restore-a-previously-created-backup)
- [Upgrade to latest EE](https://about.gitlab.com/downloads-ee) - [Upgrade to latest EE](https://about.gitlab.com/downloads-ee)
- (GitLab inc. only) Acquire and apply a license for the Enterprise Edition product, ask in #support - (GitLab inc. only) Acquire and apply a license for the Enterprise Edition product, ask in #support
- Perform a downgrade from [EE to CE](https://docs.gitlab.com/ee/downgrade_ee_to_ce/README.html) - Perform a downgrade from [EE to CE](https://docs.gitlab.com/ee/downgrade_ee_to_ce/README.html)
   
#### Start to learn about some of the integrations that we support #### Start to learn about some of the integrations that we support
Loading
@@ -98,9 +98,9 @@ Our integrations add great value to GitLab. User questions often relate to integ
Loading
@@ -98,9 +98,9 @@ Our integrations add great value to GitLab. User questions often relate to integ
- [Environment Information and maintenance checks](https://docs.gitlab.com/ce/raketasks/maintenance.html) - [Environment Information and maintenance checks](https://docs.gitlab.com/ce/raketasks/maintenance.html)
- [GitLab check](https://docs.gitlab.com/ce/raketasks/check.html) - [GitLab check](https://docs.gitlab.com/ce/raketasks/check.html)
- Omnibus commands - Omnibus commands
- [Status](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/maintenance/README.md#get-service-status) - [Status](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/maintenance/README.md#get-service-status)
- [Starting and stopping services](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/maintenance/README.md#starting-and-stopping) - [Starting and stopping services](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/maintenance/README.md#starting-and-stopping)
- [Starting a rails console](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/maintenance/README.md#invoking-rake-tasks) - [Starting a rails console](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/maintenance/README.md#invoking-rake-tasks)
   
#### Learn about the Support process #### Learn about the Support process
   
Loading
@@ -118,16 +118,16 @@ Zendesk is our Support Centre and our main communication line with our Customers
Loading
@@ -118,16 +118,16 @@ Zendesk is our Support Centre and our main communication line with our Customers
- Here you will find a large variety of queries mainly from our Users who are self hosting GitLab CE - Here you will find a large variety of queries mainly from our Users who are self hosting GitLab CE
- Understand the questions that are asked and dig in to try to find a solution - Understand the questions that are asked and dig in to try to find a solution
- [Proceed on to the GitLab.com Support Forum](https://about.gitlab.com/handbook/support/#gitlabcom-support-trackera-namesupp-foruma) - [Proceed on to the GitLab.com Support Forum](https://about.gitlab.com/handbook/support/#gitlabcom-support-trackera-namesupp-foruma)
- Here you will find queries regarding our own GitLab.com - Here you will find queries regarding our own GitLab.com
- Helping Users here will give you an understanding of our Admin interface and other tools - Helping Users here will give you an understanding of our Admin interface and other tools
- [Proceed on to the Twitter tickets in Zendesk](https://about.gitlab.com/handbook/support/#twitter) - [Proceed on to the Twitter tickets in Zendesk](https://about.gitlab.com/handbook/support/#twitter)
- Here you will gain a great insight into our userbase - Here you will gain a great insight into our userbase
- Learn from any complaints and problems and feed them back to the team - Learn from any complaints and problems and feed them back to the team
- Tweets can range from help needed with GitLab installations, the API and just general queries - Tweets can range from help needed with GitLab installations, the API and just general queries
- [Proceed on to Regular email Support tickets](https://about.gitlab.com/handbook/support/#regular-zendesk-tickets-a-nameregulara) - [Proceed on to Regular email Support tickets](https://about.gitlab.com/handbook/support/#regular-zendesk-tickets-a-nameregulara)
- Here you will find tickets from our GitLab EE Customers and GitLab CE Users - Here you will find tickets from our GitLab EE Customers and GitLab CE Users
- Tickets here are extremely varied and often very technical - Tickets here are extremely varied and often very technical
- You should be prepared for these tickets, given the knowledge gained from previous tiers and your training - You should be prepared for these tickets, given the knowledge gained from previous tiers and your training
- Check out your colleagues' responses - Check out your colleagues' responses
- Hop on to the #support-live-feed channel in Slack and see the tickets as they come in and are updated - Hop on to the #support-live-feed channel in Slack and see the tickets as they come in and are updated
- Read through old tickets that your colleagues have worked on - Read through old tickets that your colleagues have worked on
Loading
@@ -135,10 +135,10 @@ Zendesk is our Support Centre and our main communication line with our Customers
Loading
@@ -135,10 +135,10 @@ Zendesk is our Support Centre and our main communication line with our Customers
- [Learn about Cisco WebEx](https://about.gitlab.com/handbook/support/onboarding/#webexa-namewebexa) - [Learn about Cisco WebEx](https://about.gitlab.com/handbook/support/onboarding/#webexa-namewebexa)
- Training calls - Training calls
- Information gathering calls - Information gathering calls
- It's good to find out how new and prospective customers are going to be using the product and how they will set up their infrastructure - It's good to find out how new and prospective customers are going to be using the product and how they will set up their infrastructure
- Diagnosis calls - Diagnosis calls
- When email isn't enough we may need to hop on a call and do some debugging along side the customer - When email isn't enough we may need to hop on a call and do some debugging along side the customer
- These paired calls are a great learning experience - These paired calls are a great learning experience
- Upgrade calls - Upgrade calls
- Emergency calls - Emergency calls
   
Loading
Loading
Loading
@@ -10,7 +10,7 @@ comments: false
Loading
@@ -10,7 +10,7 @@ comments: false
   
- Find a commit that introduced a bug - Find a commit that introduced a bug
- Works through a process of elimination - Works through a process of elimination
- Specify a known good and bad revision to begin - Specify a known good and bad revision to begin
   
---------- ----------
   
Loading
Loading
Loading
@@ -16,10 +16,10 @@ comments: false
Loading
@@ -16,10 +16,10 @@ comments: false
   
- **Linux** - **Linux**
```bash ```bash
sudo yum install git-all sudo yum install git-all
``` ```
```bash ```bash
sudo apt-get install git-all sudo apt-get install git-all
``` ```
   
---------- ----------
Loading
Loading
Loading
@@ -9,13 +9,15 @@ comments: false
Loading
@@ -9,13 +9,15 @@ comments: false
## Instantiating Repositories ## Instantiating Repositories
   
* Create a new repository by instantiating it through * Create a new repository by instantiating it through
```bash
git init ```bash
``` git init
```
* Copy an existing project by cloning the repository through * Copy an existing project by cloning the repository through
```bash
git clone <url> ```bash
``` git clone <url>
```
   
---------- ----------
   
Loading
@@ -24,17 +26,18 @@ git clone <url>
Loading
@@ -24,17 +26,18 @@ git clone <url>
* To instantiate a central repository a `--bare` flag is required. * To instantiate a central repository a `--bare` flag is required.
* Bare repositories don't allow file editing or committing changes. * Bare repositories don't allow file editing or committing changes.
* Create a bare repo with * Create a bare repo with
```bash
git init --bare project-name.git ```bash
``` git init --bare project-name.git
```
   
---------- ----------
   
## Instantiate workflow with clone ## Instantiate workflow with clone
   
1. Create a project in your user namespace 1. Create a project in your user namespace
- Choose to import from 'Any Repo by URL' and use - Choose to import from 'Any Repo by URL' and use
https://gitlab.com/gitlab-org/training-examples.git https://gitlab.com/gitlab-org/training-examples.git
2. Create a '`Workspace`' directory in your home directory. 2. Create a '`Workspace`' directory in your home directory.
3. Clone the '`training-examples`' project 3. Clone the '`training-examples`' project
   
Loading
Loading
Loading
@@ -11,27 +11,35 @@ comments: false
Loading
@@ -11,27 +11,35 @@ comments: false
Adds content to the index or staging area. Adds content to the index or staging area.
   
* Adds a list of file * Adds a list of file
```bash
git add <files> ```bash
``` git add <files>
```
* Adds all files including deleted ones * Adds all files including deleted ones
```bash
git add -A ```bash
``` git add -A
```
   
---------- ----------
   
## Git add continued ## Git add continued
   
* Add all text files in current dir * Add all text files in current dir
```bash
git add *.txt ```bash
``` git add *.txt
```
* Add all text file in the project * Add all text file in the project
```bash
git add "*.txt*" ```bash
``` git add "*.txt*"
```
* Adds all files in directory * Adds all files in directory
```bash
git add views/layouts/ ```bash
``` git add views/layouts/
```
Loading
@@ -9,31 +9,36 @@ comments: false
Loading
@@ -9,31 +9,36 @@ comments: false
Git log lists commit history. It allows searching and filtering. Git log lists commit history. It allows searching and filtering.
   
* Initiate log * Initiate log
```
git log ```
``` git log
```
   
* Retrieve set number of records: * Retrieve set number of records:
```
git log -n 2 ```
``` git log -n 2
```
   
* Search commits by author. Allows user name or a regular expression. * Search commits by author. Allows user name or a regular expression.
```
git log --author="user_name" ```
``` git log --author="user_name"
```
   
---------- ----------
   
* Search by comment message. * Search by comment message.
```
git log --grep="<pattern>" ```
``` git log --grep="<pattern>"
```
   
* Search by date * Search by date
```
git log --since=1.month.ago --until=3.weeks.ago ```
``` git log --since=1.month.ago --until=3.weeks.ago
```
   
   
---------- ----------
Loading
Loading
Loading
@@ -9,26 +9,30 @@ comments: false
Loading
@@ -9,26 +9,30 @@ comments: false
## Undo Commits ## Undo Commits
   
* Undo last commit putting everything back into the staging area. * Undo last commit putting everything back into the staging area.
```
git reset --soft HEAD^ ```
``` git reset --soft HEAD^
```
   
* Add files and change message with: * Add files and change message with:
```
git commit --amend -m "New Message" ```
``` git commit --amend -m "New Message"
```
   
---------- ----------
   
* Undo last and remove changes * Undo last and remove changes
```
git reset --hard HEAD^ ```
``` git reset --hard HEAD^
```
   
* Same as last one but for two commits back * Same as last one but for two commits back
```
git reset --hard HEAD^^ ```
``` git reset --hard HEAD^^
```
   
** Don't reset after pushing ** ** Don't reset after pushing **
   
Loading
Loading
Loading
@@ -10,50 +10,52 @@ We use git stash to store our changes when they are not ready to be committed
Loading
@@ -10,50 +10,52 @@ We use git stash to store our changes when they are not ready to be committed
and we need to change to a different branch. and we need to change to a different branch.
   
* Stash * Stash
```
git stash save ```
# or git stash save
git stash # or
# or with a message git stash
git stash save "this is a message to display on the list" # or with a message
``` git stash save "this is a message to display on the list"
```
   
* Apply stash to keep working on it * Apply stash to keep working on it
```
git stash apply ```
# or apply a specific one from out stack git stash apply
git stash apply stash@{3} # or apply a specific one from out stack
``` git stash apply stash@{3}
```
   
---------- ----------
   
* Every time we save a stash it gets stacked so by using list we can see all our * Every time we save a stash it gets stacked so by using list we can see all our
stashes. stashes.
   
``` ```
git stash list git stash list
# or for more information (log methods) # or for more information (log methods)
git stash list --stat git stash list --stat
``` ```
   
* To clean our stack we need to manually remove them. * To clean our stack we need to manually remove them.
   
``` ```
# drop top stash # drop top stash
git stash drop git stash drop
# or # or
git stash drop <name> git stash drop <name>
# to clear all history we can use # to clear all history we can use
git stash clear git stash clear
``` ```
   
---------- ----------
   
* Apply and drop on one command * Apply and drop on one command
   
``` ```
git stash pop git stash pop
``` ```
   
* If we meet conflicts we need to either reset or commit our changes. * If we meet conflicts we need to either reset or commit our changes.
   
Loading
Loading
Loading
@@ -10,26 +10,27 @@ comments: false
Loading
@@ -10,26 +10,27 @@ comments: false
   
* To remove files from stage use reset HEAD. Where HEAD is the last commit of the current branch. * To remove files from stage use reset HEAD. Where HEAD is the last commit of the current branch.
   
```bash ```bash
git reset HEAD <file> git reset HEAD <file>
``` ```
   
* This will unstage the file but maintain the modifications. To revert the file back to the state it was in before the changes we can use: * This will unstage the file but maintain the modifications. To revert the file back to the state it was in before the changes we can use:
   
```bash ```bash
git checkout -- <file> git checkout -- <file>
``` ```
   
---------- ----------
   
* To remove a file from disk and repo use 'git rm' and to rm a dir use the '-r' flag. * To remove a file from disk and repo use 'git rm' and to rm a dir use the '-r' flag.
```
git rm '*.txt'
git rm -r <dirname>
```
   
```
git rm '*.txt'
git rm -r <dirname>
```
   
* If we want to remove a file from the repository but keep it on disk, say we forgot to add it to our `.gitignore` file then use `--cache`. * If we want to remove a file from the repository but keep it on disk, say we forgot to add it to our `.gitignore` file then use `--cache`.
```
git rm <filename> --cache ```
``` git rm <filename> --cache
```
Loading
@@ -150,48 +150,48 @@ Update your current configuration as follows, replacing with your storages names
Loading
@@ -150,48 +150,48 @@ Update your current configuration as follows, replacing with your storages names
   
1. Update your `gitlab.yml`, from 1. Update your `gitlab.yml`, from
   
```yaml ```yaml
repositories: repositories:
storages: # You must have at least a 'default' storage path. storages: # You must have at least a 'default' storage path.
default: /home/git/repositories default: /home/git/repositories
nfs: /mnt/nfs/repositories nfs: /mnt/nfs/repositories
cephfs: /mnt/cephfs/repositories cephfs: /mnt/cephfs/repositories
``` ```
to to
```yaml ```yaml
repositories: repositories:
storages: # You must have at least a 'default' storage path. storages: # You must have at least a 'default' storage path.
default: default:
path: /home/git/repositories path: /home/git/repositories
nfs: nfs:
path: /mnt/nfs/repositories path: /mnt/nfs/repositories
cephfs: cephfs:
path: /mnt/cephfs/repositories path: /mnt/cephfs/repositories
``` ```
   
**For Omnibus installations** **For Omnibus installations**
   
1. Update your `/etc/gitlab/gitlab.rb`, from 1. Update your `/etc/gitlab/gitlab.rb`, from
   
```ruby ```ruby
git_data_dirs({ git_data_dirs({
"default" => "/var/opt/gitlab/git-data", "default" => "/var/opt/gitlab/git-data",
"nfs" => "/mnt/nfs/git-data", "nfs" => "/mnt/nfs/git-data",
"cephfs" => "/mnt/cephfs/git-data" "cephfs" => "/mnt/cephfs/git-data"
}) })
``` ```
to to
```ruby ```ruby
git_data_dirs({ git_data_dirs({
"default" => { "path" => "/var/opt/gitlab/git-data" }, "default" => { "path" => "/var/opt/gitlab/git-data" },
"nfs" => { "path" => "/mnt/nfs/git-data" }, "nfs" => { "path" => "/mnt/nfs/git-data" },
"cephfs" => { "path" => "/mnt/cephfs/git-data" } "cephfs" => { "path" => "/mnt/cephfs/git-data" }
}) })
``` ```
   
#### Git configuration #### Git configuration
   
Loading
Loading
Loading
@@ -150,48 +150,48 @@ Update your current configuration as follows, replacing with your storages names
Loading
@@ -150,48 +150,48 @@ Update your current configuration as follows, replacing with your storages names
   
1. Update your `gitlab.yml`, from 1. Update your `gitlab.yml`, from
   
```yaml ```yaml
repositories: repositories:
storages: # You must have at least a 'default' storage path. storages: # You must have at least a 'default' storage path.
default: /home/git/repositories default: /home/git/repositories
nfs: /mnt/nfs/repositories nfs: /mnt/nfs/repositories
cephfs: /mnt/cephfs/repositories cephfs: /mnt/cephfs/repositories
``` ```
to to
```yaml ```yaml
repositories: repositories:
storages: # You must have at least a 'default' storage path. storages: # You must have at least a 'default' storage path.
default: default:
path: /home/git/repositories path: /home/git/repositories
nfs: nfs:
path: /mnt/nfs/repositories path: /mnt/nfs/repositories
cephfs: cephfs:
path: /mnt/cephfs/repositories path: /mnt/cephfs/repositories
``` ```
   
**For Omnibus installations** **For Omnibus installations**
   
1. Update your `/etc/gitlab/gitlab.rb`, from 1. Update your `/etc/gitlab/gitlab.rb`, from
```ruby ```ruby
git_data_dirs({ git_data_dirs({
"default" => "/var/opt/gitlab/git-data", "default" => "/var/opt/gitlab/git-data",
"nfs" => "/mnt/nfs/git-data", "nfs" => "/mnt/nfs/git-data",
"cephfs" => "/mnt/cephfs/git-data" "cephfs" => "/mnt/cephfs/git-data"
}) })
``` ```
to to
```ruby ```ruby
git_data_dirs({ git_data_dirs({
"default" => { "path" => "/var/opt/gitlab/git-data" }, "default" => { "path" => "/var/opt/gitlab/git-data" },
"nfs" => { "path" => "/mnt/nfs/git-data" }, "nfs" => { "path" => "/mnt/nfs/git-data" },
"cephfs" => { "path" => "/mnt/cephfs/git-data" } "cephfs" => { "path" => "/mnt/cephfs/git-data" }
}) })
``` ```
   
#### Git configuration #### Git configuration
   
Loading
Loading
# Health Check # Health Check
   
>**Notes:** > **Notes:**
- Liveness and readiness probes were [introduced][ce-10416] in GitLab 9.1. > - Liveness and readiness probes were [introduced][ce-10416] in GitLab 9.1.
- The `health_check` endpoint was [introduced][ce-3888] in GitLab 8.8 and will > - The `health_check` endpoint was [introduced][ce-3888] in GitLab 8.8 and will
be deprecated in GitLab 9.1. Read more in the [old behavior](#old-behavior) > be deprecated in GitLab 9.1. Read more in the [old behavior](#old-behavior)
section. > section.
- [Access token](#access-token) has been deprecated in GitLab 9.4 > - [Access token](#access-token) has been deprecated in GitLab 9.4
in favor of [IP whitelist](#ip-whitelist) > in favor of [IP whitelist](#ip-whitelist)
   
GitLab provides liveness and readiness probes to indicate service health and GitLab provides liveness and readiness probes to indicate service health and
reachability to required services. These probes report on the status of the reachability to required services. These probes report on the status of the
Loading
Loading
# Award emoji # Award emoji
   
>**Notes:** > **Notes:**
- First [introduced][1825] in GitLab 8.2. > - First [introduced][1825] in GitLab 8.2.
- GitLab 9.0 [introduced][ce-9570] the usage of native emojis if the platform > - GitLab 9.0 [introduced][ce-9570] the usage of native emojis if the platform
supports them and falls back to images or CSS sprites. This change greatly > supports them and falls back to images or CSS sprites. This change greatly
improved the award emoji performance overall. > improved the award emoji performance overall.
   
When you're collaborating online, you get fewer opportunities for high-fives When you're collaborating online, you get fewer opportunities for high-fives
and thumbs-ups. Emoji can be awarded to issues, merge requests, snippets, and and thumbs-ups. Emoji can be awarded to issues, merge requests, snippets, and
Loading
Loading
Loading
@@ -23,9 +23,9 @@ in the form of a resolvable or threaded discussion.
Loading
@@ -23,9 +23,9 @@ in the form of a resolvable or threaded discussion.
   
## Resolvable discussions ## Resolvable discussions
   
>**Notes:** > **Notes:**
- The main feature was [introduced][ce-5022] in GitLab 8.11. > - The main feature was [introduced][ce-5022] in GitLab 8.11.
- Resolvable discussions can be added only to merge request diffs. > - Resolvable discussions can be added only to merge request diffs.
   
Discussion resolution helps keep track of progress during planning or code review. Discussion resolution helps keep track of progress during planning or code review.
Resolving comments prevents you from forgetting to address feedback and lets you Resolving comments prevents you from forgetting to address feedback and lets you
Loading
Loading
Loading
@@ -22,14 +22,14 @@ group and grant access to all their projects at once
Loading
@@ -22,14 +22,14 @@ group and grant access to all their projects at once
- Create a group, include members of your team, and make it easier to - Create a group, include members of your team, and make it easier to
`@mention` all the team at once in issues and merge requests `@mention` all the team at once in issues and merge requests
- Create a group for your company members, and create [subgroups](subgroups/index.md) - Create a group for your company members, and create [subgroups](subgroups/index.md)
for each individual team. Let's say you create a group called `company-team`, and among others, for each individual team. Let's say you create a group called `company-team`, and among others,
you created subgroups in this group for each individual team `backend-team`, you created subgroups in this group for each individual team `backend-team`,
`frontend-team`, and `production-team`: `frontend-team`, and `production-team`:
1. When you start a new implementation from an issue, you add a comment: 1. When you start a new implementation from an issue, you add a comment:
_"`@company-team`, let's do it! `@company-team/backend-team` you're good to go!"_ _"`@company-team`, let's do it! `@company-team/backend-team` you're good to go!"_
1. When your backend team needs help from frontend, they add a comment: 1. When your backend team needs help from frontend, they add a comment:
_"`@company-team/frontend-team` could you help us here please?"_ _"`@company-team/frontend-team` could you help us here please?"_
1. When the frontend team completes their implementation, they comment: 1. When the frontend team completes their implementation, they comment:
_"`@company-team/backend-team`, it's done! Let's ship it `@company-team/production-team`!"_ _"`@company-team/backend-team`, it's done! Let's ship it `@company-team/production-team`!"_
   
## Namespaces ## Namespaces
Loading
@@ -64,8 +64,8 @@ together in a single list view.
Loading
@@ -64,8 +64,8 @@ together in a single list view.
## Create a new group ## Create a new group
   
> **Notes:** > **Notes:**
- For a list of words that are not allowed to be used as group names see the > - For a list of words that are not allowed to be used as group names see the
[reserved names](../reserved_names.md). > [reserved names](../reserved_names.md).
   
You can create a group in GitLab from: You can create a group in GitLab from:
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment