Commit 9749a25f authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs/ssot-university-topics' into 'master'

SSoT audit fixes for some topics in GitLab U section

Closes #61513

See merge request gitlab-org/gitlab-ce!29033
parents 6050b348 c403fdd7
...@@ -36,7 +36,7 @@ Learn how to install, configure, update, and maintain your GitLab instance. ...@@ -36,7 +36,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Omnibus support for external MySQL DB](https://docs.gitlab.com/omnibus/settings/database.html#using-a-mysql-database-management-server-enterprise-edition-only): Omnibus package supports configuring an external MySQL database. **[STARTER ONLY]** - [Omnibus support for external MySQL DB](https://docs.gitlab.com/omnibus/settings/database.html#using-a-mysql-database-management-server-enterprise-edition-only): Omnibus package supports configuring an external MySQL database. **[STARTER ONLY]**
- [Omnibus support for log forwarding](https://docs.gitlab.com/omnibus/settings/logs.html#udp-log-shipping-gitlab-enterprise-edition-only) **[STARTER ONLY]** - [Omnibus support for log forwarding](https://docs.gitlab.com/omnibus/settings/logs.html#udp-log-shipping-gitlab-enterprise-edition-only) **[STARTER ONLY]**
- [High Availability](high_availability/README.md): Configure multiple servers for scaling or high availability. - [High Availability](high_availability/README.md): Configure multiple servers for scaling or high availability.
- [High Availability on AWS](../university/high-availability/aws/README.md): Set up GitLab HA on Amazon AWS. - [Installing GitLab HA on Amazon Web Services (AWS)](../install/aws/index.md): Set up GitLab High Availability on Amazon AWS.
- [Geo](geo/replication/index.md): Replicate your GitLab instance to other geographic locations as a read-only fully operational version. **[PREMIUM ONLY]** - [Geo](geo/replication/index.md): Replicate your GitLab instance to other geographic locations as a read-only fully operational version. **[PREMIUM ONLY]**
- [Disaster Recovery](geo/disaster_recovery/index.md): Quickly fail-over to a different site with minimal effort in a disaster situation. **[PREMIUM ONLY]** - [Disaster Recovery](geo/disaster_recovery/index.md): Quickly fail-over to a different site with minimal effort in a disaster situation. **[PREMIUM ONLY]**
- [Pivotal Tile](../install/pivotal/index.md): Deploy GitLab as a pre-configured appliance using Ops Manager (BOSH) for Pivotal Cloud Foundry. **[PREMIUM ONLY]** - [Pivotal Tile](../install/pivotal/index.md): Deploy GitLab as a pre-configured appliance using Ops Manager (BOSH) for Pivotal Cloud Foundry. **[PREMIUM ONLY]**
......
This diff is collapsed.
--- ---
comments: false comments: false
type: index
--- ---
# Books # Books
List of books and resources, that may be worth reading. List of books and resources that may be worth reading.
## Papers ## Papers
......
--- ---
comments: false comments: false
type: index
--- ---
# The GitLab Book Club # The GitLab Book Club
......
--- ---
comments: false comments: false
type: reference
--- ---
# Support Boot Camp # Support Boot Camp
**Goal:** Prepare new Service Engineers at GitLab **Goal:** Prepare new Service Engineers at GitLab
For each stage there are learning goals and content to support the learning of the engineer. For each stage, there are learning goals and content to support the learning of the engineer.
The goal of this boot camp is to have every Service Engineer prepared to help our customers The goal of this boot camp is to have every Service Engineer prepared to help our customers
with whatever needs they might have and to also assist our awesome community with their with whatever needs they might have and to also assist our awesome community with their
questions. questions.
...@@ -15,7 +16,7 @@ Always start with the [University Overview](../README.md) and then work ...@@ -15,7 +16,7 @@ Always start with the [University Overview](../README.md) and then work
your way here for more advanced and specific training. Once you feel comfortable your way here for more advanced and specific training. Once you feel comfortable
with the topics of the current stage, move to the next. with the topics of the current stage, move to the next.
### Stage 1 ## Stage 1
Follow the topics on the [University Overview](../README.md), concentrate on it Follow the topics on the [University Overview](../README.md), concentrate on it
during your first Stage, but also: during your first Stage, but also:
...@@ -23,22 +24,22 @@ during your first Stage, but also: ...@@ -23,22 +24,22 @@ during your first Stage, but also:
- Perform the [first steps](https://about.gitlab.com/handbook/support/onboarding/#first-steps) of - Perform the [first steps](https://about.gitlab.com/handbook/support/onboarding/#first-steps) of
the on-boarding process for new Service Engineers the on-boarding process for new Service Engineers
#### Goals ### Goals
Aim to have a good overview of the Product and main features, Git and the Company Aim to have a good overview of the Product and main features, Git and the Company
### Stage 2 ## Stage 2
Continue to look over remaining portions of the [University Overview](../README.md) and continue on to these topics: Continue to look over remaining portions of the [University Overview](../README.md) and continue on to these topics:
#### Set up your development machine ### Set up your development machine
Get your development machine ready to familiarize yourself with the codebase, the components, and to be prepared to reproduce issues that our users encounter Get your development machine ready to familiarize yourself with the codebase, the components, and to be prepared to reproduce issues that our users encounter
- Install the [GDK](https://gitlab.com/gitlab-org/gitlab-development-kit) - Install the [GDK](https://gitlab.com/gitlab-org/gitlab-development-kit)
- [Set up OpenLDAP as part of this](https://gitlab.com/gitlab-org/gitlab-development-kit#openldap) - [Set up OpenLDAP as part of this](https://gitlab.com/gitlab-org/gitlab-development-kit#openldap)
#### Become comfortable with the Installation processes that we support ### Become comfortable with the Installation processes that we support
It's important to understand how to install GitLab in the same way that our users do. Try installing different versions and upgrading and downgrading between them. Installation from source will give you a greater understanding of the components that we employ and how everything fits together. It's important to understand how to install GitLab in the same way that our users do. Try installing different versions and upgrading and downgrading between them. Installation from source will give you a greater understanding of the components that we employ and how everything fits together.
...@@ -73,7 +74,7 @@ Sometimes we need to upgrade customers from old versions of GitLab to latest, so ...@@ -73,7 +74,7 @@ Sometimes we need to upgrade customers from old versions of GitLab to latest, so
- (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](../../downgrade_ee_to_ce/README.md) - Perform a downgrade from [EE to CE](../../downgrade_ee_to_ce/README.md)
#### Start to learn about some of the integrations that we support ### Start to learn about some of the integrations that we support
Our integrations add great value to GitLab. User questions often relate to integrating GitLab with existing external services and the configuration involved Our integrations add great value to GitLab. User questions often relate to integrating GitLab with existing external services and the configuration involved
...@@ -83,16 +84,16 @@ Our integrations add great value to GitLab. User questions often relate to integ ...@@ -83,16 +84,16 @@ Our integrations add great value to GitLab. User questions often relate to integ
- [Jenkins](../../integration/jenkins.md) - [Jenkins](../../integration/jenkins.md)
- [SAML](../../integration/saml.md) - [SAML](../../integration/saml.md)
#### Goals ### Goals
- Aim to be comfortable with installation of the GitLab product and configuration of some of the major integrations - Aim to be comfortable with installation of the GitLab product and configuration of some of the major integrations
- Aim to have an installation available for reproducing customer reports - Aim to have an installation available for reproducing customer reports
### Stage 3 ## Stage 3
#### Understand the gathering of diagnostics for GitLab instances ### Understand the gathering of diagnostics for GitLab instances
- Learn about the GitLab checks that are available - Learn about the GitLab checks that are available:
- [Environment Information and maintenance checks](../../raketasks/maintenance.md) - [Environment Information and maintenance checks](../../raketasks/maintenance.md)
- [GitLab check](../../raketasks/check.md) - [GitLab check](../../raketasks/check.md)
- Omnibus commands - Omnibus commands
...@@ -100,11 +101,11 @@ Our integrations add great value to GitLab. User questions often relate to integ ...@@ -100,11 +101,11 @@ Our integrations add great value to GitLab. User questions often relate to integ
- [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
Zendesk is our Support Centre and our main communication line with our Customers. We communicate with customers through several other channels too Zendesk is our Support Centre and our main communication line with our Customers. We communicate with customers through several other channels too
- Familiarize yourself with ZenDesk - Familiarize yourself with ZenDesk:
- [UI Overview](https://support.zendesk.com/hc/en-us/articles/203661806-Introduction-to-the-Zendesk-agent-interface) - [UI Overview](https://support.zendesk.com/hc/en-us/articles/203661806-Introduction-to-the-Zendesk-agent-interface)
- [Updating Tickets](https://support.zendesk.com/hc/en-us/articles/212530318-Updating-and-solving-tickets) - [Updating Tickets](https://support.zendesk.com/hc/en-us/articles/212530318-Updating-and-solving-tickets)
- [Working w/ Tickets](https://support.zendesk.com/hc/en-us/articles/203690856-Working-with-tickets) *Read: avoiding agent collision.* - [Working w/ Tickets](https://support.zendesk.com/hc/en-us/articles/203690856-Working-with-tickets) *Read: avoiding agent collision.*
...@@ -140,7 +141,7 @@ Zendesk is our Support Centre and our main communication line with our Customers ...@@ -140,7 +141,7 @@ Zendesk is our Support Centre and our main communication line with our Customers
- Upgrade calls - Upgrade calls
- Emergency calls - Emergency calls
#### Learn about the Escalation process for tickets ### Learn about the Escalation process for tickets
Some tickets need specific knowledge or a deep understanding of a particular component and will need to be escalated to a Senior Service Engineer or Developer Some tickets need specific knowledge or a deep understanding of a particular component and will need to be escalated to a Senior Service Engineer or Developer
...@@ -148,7 +149,7 @@ Some tickets need specific knowledge or a deep understanding of a particular com ...@@ -148,7 +149,7 @@ Some tickets need specific knowledge or a deep understanding of a particular com
- Find the macros in Zendesk for ticket escalations - Find the macros in Zendesk for ticket escalations
- Take a look at the [GitLab.com Team page](https://about.gitlab.com/team/) to find the resident experts in their fields - Take a look at the [GitLab.com Team page](https://about.gitlab.com/team/) to find the resident experts in their fields
#### Learn about raising issues and fielding feature proposals ### Learn about raising issues and fielding feature proposals
- Understand what's in the pipeline and proposed features at GitLab: [Direction Page](https://about.gitlab.com/direction/) - Understand what's in the pipeline and proposed features at GitLab: [Direction Page](https://about.gitlab.com/direction/)
- Practice searching issues and filtering using [labels](https://gitlab.com/gitlab-org/gitlab-ce/labels) to find existing feature proposals and bugs - Practice searching issues and filtering using [labels](https://gitlab.com/gitlab-org/gitlab-ce/labels) to find existing feature proposals and bugs
...@@ -157,15 +158,15 @@ Some tickets need specific knowledge or a deep understanding of a particular com ...@@ -157,15 +158,15 @@ Some tickets need specific knowledge or a deep understanding of a particular com
- Take a look at the [existing issue templates](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker) to see what is expected - Take a look at the [existing issue templates](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker) to see what is expected
- Raise issues for bugs in a manner that would make the issue easily reproducible. A Developer or a contributor may work on your issue - Raise issues for bugs in a manner that would make the issue easily reproducible. A Developer or a contributor may work on your issue
#### Goals ### Goals
- Aim to have a good understanding of the problems that customers are facing - Aim to have a good understanding of the problems that customers are facing
- Aim to have gained experience in scheduling and participating in calls with customers - Aim to have gained experience in scheduling and participating in calls with customers
- Aim to have a good understanding of ticket flow through Zendesk and how to interact with our various channels - Aim to have a good understanding of ticket flow through Zendesk and how to interact with our various channels
### Stage 4 ## Stage 4
#### Advanced GitLab topics ### Advanced GitLab topics
Move on to understanding some of GitLab's more advanced features. You can make use of GitLab.com to understand the features from an end-user perspective and then use your own instance to understand setup and configuration of the feature from an Administrative perspective Move on to understanding some of GitLab's more advanced features. You can make use of GitLab.com to understand the features from an end-user perspective and then use your own instance to understand setup and configuration of the feature from an Administrative perspective
...@@ -179,11 +180,23 @@ Move on to understanding some of GitLab's more advanced features. You can make u ...@@ -179,11 +180,23 @@ Move on to understanding some of GitLab's more advanced features. You can make u
and the [CE codebase](https://gitlab.com/gitlab-org/gitlab-ce) and the [CE codebase](https://gitlab.com/gitlab-org/gitlab-ce)
- Ask as many questions as you can think of on the `#support` chat channel - Ask as many questions as you can think of on the `#support` chat channel
#### Get initiated for on-call duty ### Get initiated for on-call duty
- Read over the [public run-books to understand common tasks](https://gitlab.com/gitlab-com/runbooks) - Read over the [public run-books to understand common tasks](https://gitlab.com/gitlab-com/runbooks)
- Create an issue on the internal Organization tracker to schedule time with the DevOps / Production team, so that you learn how to handle GitLab.com going down. Once you are trained for this, you are ready to be added to the on-call rotation. - Create an issue on the internal Organization tracker to schedule time with the DevOps / Production team, so that you learn how to handle GitLab.com going down. Once you are trained for this, you are ready to be added to the on-call rotation.
#### Goals ### Goals
- Aim to become a fully-fledged Service Engineer! - Aim to become a fully-fledged Service Engineer!
<!-- ## 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, e.g. `### 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. -->
--- ---
comments: false comments: false
type: reference
--- ---
# What is the GitLab Flow # What is the GitLab Flow
...@@ -41,5 +42,17 @@ comments: false ...@@ -41,5 +42,17 @@ comments: false
## More details ## More details
For more information read through the [GitLab Flow](../../workflow/gitlab_flow.md) For more information, read through the [GitLab Flow](../../workflow/gitlab_flow.md)
documentation. documentation.
<!-- ## 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, e.g. `### 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. -->
--- ---
comments: false comments: false
type: index
--- ---
# GitLab Training Material # GitLab Training Material
...@@ -8,3 +9,34 @@ All GitLab training material is stored in markdown format. Slides are ...@@ -8,3 +9,34 @@ All GitLab training material is stored in markdown format. Slides are
generated using [Deskset](http://www.decksetapp.com/). generated using [Deskset](http://www.decksetapp.com/).
All training material is open to public contribution. All training material is open to public contribution.
This section contains the following topics:
- [Agile and Git](topics/agile_git.md).
- [Bisect](topics/bisect.md).
- [Cherry pick](topics/cherry_picking.md).
- [Code review and collaboration with Merge Requests](topics/merge_requests.md).
- [Configure your environment](topics/env_setup.md).
- [Explore GitLab](topics/explore_gitlab.md).
- [Feature branching](topics/feature_branching.md).
- [Getting started](topics/getting_started.md).
- [GitLab flow](gitlab_flow.md).
- [GitLab Git workshop](user_training.md).
- [Git add](topics/git_add.md).
- [Git introduction](topics/git_intro.md).
- [Git log](topics/git_log.md).
- [Git stash](topics/stash.md).
- [Merge conflicts](topics/merge_conflicts.md).
- [Rollback commits](topics/rollback_commits.md).
- [Subtree](topics/subtree.md).
- [Tags](topics/tags.md).
- [Unstage](topics/unstage.md).
## Additional Resources
1. [GitLab Documentation](http://docs.gitlab.com)
1. [GUI Clients](http://git-scm.com/downloads/guis)
1. [Pro Git book](http://git-scm.com/book)
1. [Platzi Course](https://courses.platzi.com/courses/git-gitlab/)
1. [Code School tutorial](http://try.github.io/)
1. Contact us at `subscribers@gitlab.com`
---
comments: false
---
# Additional Resources
1. GitLab Documentation: <http://docs.gitlab.com>.
1. GUI Clients: <http://git-scm.com/downloads/guis>.
1. Pro Git book: <http://git-scm.com/book>.
1. Platzi Course: <https://courses.platzi.com/courses/git-gitlab/>.
1. Code School tutorial: <http://try.github.io/>.
1. Contact us at `subscribers@gitlab.com`.
...@@ -4,22 +4,16 @@ comments: false ...@@ -4,22 +4,16 @@ comments: false
# Agile and Git # Agile and Git
----------
## Agile ## Agile
Lean software development methods focused on collaboration and interaction Lean software development methods focused on collaboration and interaction
with fast and smaller deployment cycles. with fast and smaller deployment cycles.
----------
## Where Git comes in ## Where Git comes in
Git is an excellent tool for an Agile team considering that it allows Git is an excellent tool for an Agile team considering that it allows
decentralized and simultaneous development. decentralized and simultaneous development.
----------
### Branching And Workflows ### Branching And Workflows
Branching in an Agile environment usually happens around user stories with one Branching in an Agile environment usually happens around user stories with one
...@@ -30,8 +24,7 @@ with his/her initials, and US id. ...@@ -30,8 +24,7 @@ with his/her initials, and US id.
After its tested merge into master and remove the branch. After its tested merge into master and remove the branch.
----------
## What about GitLab ## What about GitLab
Tools like GitLab enhance collaboration by adding dialog around code mainly Tools like GitLab enhance collaboration by adding dialog around code mainly
through issues and merge requests. through issues and merge requests.
...@@ -4,16 +4,12 @@ comments: false ...@@ -4,16 +4,12 @@ comments: false
# Bisect # Bisect
----------
## Bisect ## Bisect
- 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
----------
## Bisect ## Bisect
1. Start the bisect process 1. Start the bisect process
...@@ -23,11 +19,9 @@ comments: false ...@@ -23,11 +19,9 @@ comments: false
1. Tell bisect the result 1. Tell bisect the result
1. Repeat the previous 2 items until you find the offending commit 1. Repeat the previous 2 items until you find the offending commit
----------
## Setup ## Setup
``` ```sh
mkdir bisect-ex mkdir bisect-ex
cd bisect-ex cd bisect-ex
touch index.html touch index.html
...@@ -44,9 +38,7 @@ comments: false ...@@ -44,9 +38,7 @@ comments: false
vi index.html vi index.html
``` ```
---------- ```sh
```
# Add all good 3 # Add all good 3
git add -A git add -A
git commit -m "fourth commit" git commit -m "fourth commit"
...@@ -64,11 +56,9 @@ comments: false ...@@ -64,11 +56,9 @@ comments: false
git commit -m "seventh commit" git commit -m "seventh commit"
``` ```
----------
## Commands ## Commands
``` ```sh
git bisect start git bisect start
# Test your code # Test your code
git bisect bad git bisect bad
......
...@@ -4,16 +4,12 @@ comments: false ...@@ -4,16 +4,12 @@ comments: false
# Cherry Pick # Cherry Pick
----------
## Cherry Pick ## Cherry Pick
- Given an existing commit on one branch, apply the change to another branch - Given an existing commit on one branch, apply the change to another branch
- Useful for backporting bug fixes to previous release branches - Useful for backporting bug fixes to previous release branches
- Make the commit on the master branch and pick in to stable - Make the commit on the master branch and pick in to stable
----------
## Cherry Pick ## Cherry Pick
1. Check out a new 'stable' branch from 'master' 1. Check out a new 'stable' branch from 'master'
...@@ -23,8 +19,6 @@ comments: false ...@@ -23,8 +19,6 @@ comments: false
1. Check out the 'stable' branch 1. Check out the 'stable' branch
1. Cherry pick the commit using the SHA obtained earlier 1. Cherry pick the commit using the SHA obtained earlier
----------
## Commands ## Commands
```bash ```bash
......
...@@ -4,7 +4,6 @@ comments: false ...@@ -4,7 +4,6 @@ comments: false
# Configure your environment # Configure your environment
----------
## Install ## Install
- **Windows** - **Windows**
...@@ -22,8 +21,6 @@ comments: false ...@@ -22,8 +21,6 @@ comments: false
sudo apt-get install git-all sudo apt-get install git-all
``` ```
----------
## Configure Git ## Configure Git
One-time configuration of the Git client One-time configuration of the Git client
...@@ -33,8 +30,6 @@ git config --global user.name "Your Name" ...@@ -33,8 +30,6 @@ git config --global user.name "Your Name"
git config --global user.email you@example.com git config --global user.email you@example.com
``` ```
----------
## Configure SSH Key ## Configure SSH Key
```bash ```bash
......
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Explore GitLab projects # Explore GitLab projects
----------
- Dashboard - Dashboard
- User Preferences - User Preferences
- Issues - Issues
......
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Feature branching # Feature branching
----------
- Efficient parallel workflow for teams - Efficient parallel workflow for teams
- Develop each feature in a branch - Develop each feature in a branch
- Keeps changes isolated - Keeps changes isolated
...@@ -13,8 +11,6 @@ comments: false ...@@ -13,8 +11,6 @@ comments: false
- Push branches to the server frequently - Push branches to the server frequently
- Hint: This is a cheap backup for your work-in-progress code - Hint: This is a cheap backup for your work-in-progress code
----------
## Feature branching ## Feature branching
1. Create a new feature branch called 'squash_some_bugs' 1. Create a new feature branch called 'squash_some_bugs'
...@@ -22,11 +18,9 @@ comments: false ...@@ -22,11 +18,9 @@ comments: false
1. Commit 1. Commit
1. Push 1. Push
----------
## Commands ## Commands
``` ```sh
git checkout -b squash_some_bugs git checkout -b squash_some_bugs
# Edit `bugs.rb` # Edit `bugs.rb`
git status git status
......
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Getting Started # Getting Started
----------
## Instantiating Repositories ## Instantiating Repositories
- Create a new repository by instantiating it through: - Create a new repository by instantiating it through:
...@@ -19,8 +17,6 @@ comments: false ...@@ -19,8 +17,6 @@ comments: false
git clone <url> git clone <url>
``` ```
----------
## Central Repos ## Central Repos
- To instantiate a central repository a `--bare` flag is required. - To instantiate a central repository a `--bare` flag is required.
...@@ -31,8 +27,6 @@ comments: false ...@@ -31,8 +27,6 @@ comments: false
git init --bare project-name.git 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.
...@@ -40,18 +34,15 @@ comments: false ...@@ -40,18 +34,15 @@ comments: false
1. Create a '`Workspace`' directory in your home directory. 1. Create a '`Workspace`' directory in your home directory.
1. Clone the '`training-examples`' project. 1. Clone the '`training-examples`' project.
----------
## Commands ## Commands
``` ```sh
mkdir ~/workspace mkdir ~/workspace
cd ~/workspace cd ~/workspace
git clone git@gitlab.example.com:<username>/training-examples.git git clone git@gitlab.example.com:<username>/training-examples.git
cd training-examples cd training-examples
``` ```
----------
## Git concepts ## Git concepts
...@@ -67,8 +58,6 @@ Files that have been modified but are not committed. ...@@ -67,8 +58,6 @@ Files that have been modified but are not committed.
Modified files that have been marked to go in the next commit. Modified files that have been marked to go in the next commit.
----------
## Committing Workflow ## Committing Workflow
1. Edit '`edit_this_file.rb`' in '`training-examples`' 1. Edit '`edit_this_file.rb`' in '`training-examples`'
...@@ -79,11 +68,9 @@ Modified files that have been marked to go in the next commit. ...@@ -79,11 +68,9 @@ Modified files that have been marked to go in the next commit.
1. Push the commit to the remote 1. Push the commit to the remote
1. View the git log 1. View the git log
----------
## Commands ## Commands
``` ```sh
# Edit `edit_this_file.rb` # Edit `edit_this_file.rb`
git status git status
git diff git diff
...@@ -93,8 +80,6 @@ git push origin master ...@@ -93,8 +80,6 @@ git push origin master
git log git log
``` ```
----------
## Note ## Note
- git fetch vs pull - git fetch vs pull
......
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Git Add # Git Add
----------
## Git Add ## Git Add
Adds content to the index or staging area. Adds content to the index or staging area.
...@@ -22,8 +20,6 @@ Adds content to the index or staging area. ...@@ -22,8 +20,6 @@ Adds content to the index or staging area.
git add -A git add -A
``` ```
----------
## Git add continued ## Git add continued
- Add all text files in current dir: - Add all text files in current dir:
......
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Git introduction # Git introduction
----------
## Intro ## Intro
<https://git-scm.com/about> <https://git-scm.com/about>
...@@ -17,8 +15,6 @@ comments: false ...@@ -17,8 +15,6 @@ comments: false
- Adapts to nearly any workflow - Adapts to nearly any workflow
- Fast, reliable and stable file format - Fast, reliable and stable file format
----------
## Help! ## Help!
Use the tools at your disposal when you get stuck. Use the tools at your disposal when you get stuck.
......
...@@ -4,44 +4,38 @@ comments: false ...@@ -4,44 +4,38 @@ comments: false
# Git Log # Git Log
----------
Git log lists commit history. It allows searching and filtering. Git log lists commit history. It allows searching and filtering.
- Initiate log: - Initiate log:
``` ```sh
git log git log
``` ```
- Retrieve set number of records: - Retrieve set number of records:
``` ```sh
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.
``` ```sh
git log --author="user_name" git log --author="user_name"
``` ```
----------
- Search by comment message: - Search by comment message:
``` ```sh
git log --grep="<pattern>" git log --grep="<pattern>"
``` ```
- Search by date: - Search by date:
``` ```sh
git log --since=1.month.ago --until=3.weeks.ago git log --since=1.month.ago --until=3.weeks.ago
``` ```
----------
## Git Log Workflow ## Git Log Workflow
1. Change to workspace directory 1. Change to workspace directory
...@@ -51,11 +45,9 @@ Git log lists commit history. It allows searching and filtering. ...@@ -51,11 +45,9 @@ Git log lists commit history. It allows searching and filtering.
1. Search by date 1. Search by date
1. Combine 1. Combine
----------
## Commands ## Commands
``` ```sh
cd ~/workspace cd ~/workspace
git clone git@gitlab.com:gitlab-org/gitlab-runner.git git clone git@gitlab.com:gitlab-org/gitlab-runner.git
cd gitlab-runner cd gitlab-runner
......
...@@ -4,15 +4,11 @@ comments: false ...@@ -4,15 +4,11 @@ comments: false
# Merge conflicts # Merge conflicts
----------
- Happen often - Happen often
- Learning to fix conflicts is hard - Learning to fix conflicts is hard
- Practice makes perfect - Practice makes perfect
- Force push after fixing conflicts. Be careful! - Force push after fixing conflicts. Be careful!
----------
## Merge conflicts ## Merge conflicts
1. Checkout a new branch and edit `conflicts.rb`. Add 'Line4' and 'Line5'. 1. Checkout a new branch and edit `conflicts.rb`. Add 'Line4' and 'Line5'.
...@@ -26,11 +22,9 @@ comments: false ...@@ -26,11 +22,9 @@ comments: false
1. Force push the changes. 1. Force push the changes.
1. Finally continue with the Merge Request. 1. Finally continue with the Merge Request.
----------
## Commands ## Commands
``` ```sh
git checkout -b conflicts_branch git checkout -b conflicts_branch
# vi conflicts.rb # vi conflicts.rb
...@@ -49,7 +43,7 @@ git push origin master ...@@ -49,7 +43,7 @@ git push origin master
Create a merge request on the GitLab web UI. You'll see a conflict warning. Create a merge request on the GitLab web UI. You'll see a conflict warning.
``` ```sh
git checkout conflicts_branch git checkout conflicts_branch
git fetch git fetch
git rebase master git rebase master
...@@ -65,7 +59,6 @@ git rebase --continue ...@@ -65,7 +59,6 @@ git rebase --continue
# need to force push so that our remote branch is restructured # need to force push so that our remote branch is restructured
git push origin conflicts_branch -f git push origin conflicts_branch -f
``` ```
----------
## Note ## Note
......
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Code review and collaboration with Merge Requests # Code review and collaboration with Merge Requests
----------
- When you want feedback create a merge request - When you want feedback create a merge request
- Target is the default branch (usually master) - Target is the default branch (usually master)
- Assign or mention the person you would like to review - Assign or mention the person you would like to review
...@@ -14,8 +12,6 @@ comments: false ...@@ -14,8 +12,6 @@ comments: false
- Anyone can comment, not just the assignee - Anyone can comment, not just the assignee
- Push corrections to the same branch - Push corrections to the same branch
----------
## Merge requests ## Merge requests
**Create your first merge request** **Create your first merge request**
...@@ -25,8 +21,6 @@ comments: false ...@@ -25,8 +21,6 @@ comments: false
1. Push a new commit to the same branch 1. Push a new commit to the same branch
1. Review the changes again and notice the update 1. Review the changes again and notice the update
----------
## Feedback and Collaboration ## Feedback and Collaboration
- Merge requests are a time for feedback and collaboration - Merge requests are a time for feedback and collaboration
...@@ -36,8 +30,6 @@ comments: false ...@@ -36,8 +30,6 @@ comments: false
- Be as receptive as possible - Be as receptive as possible
- Feedback is about the best code, not the person. You are not your code - Feedback is about the best code, not the person. You are not your code
----------
## Feedback and Collaboration ## Feedback and Collaboration
Review the Thoughtbot code-review guide for suggestions to follow when reviewing merge requests: Review the Thoughtbot code-review guide for suggestions to follow when reviewing merge requests:
......
...@@ -4,40 +4,34 @@ comments: false ...@@ -4,40 +4,34 @@ comments: false
# Rollback Commits # Rollback Commits
----------
## Undo Commits ## Undo Commits
- Undo last commit putting everything back into the staging area: - Undo last commit putting everything back into the staging area:
``` ```sh
git reset --soft HEAD^ git reset --soft HEAD^
``` ```
- Add files and change message with: - Add files and change message with:
``` ```sh
git commit --amend -m "New Message" git commit --amend -m "New Message"
``` ```
----------
- Undo last and remove changes: - Undo last and remove changes:
``` ```sh
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:
``` ```sh
git reset --hard HEAD^^ git reset --hard HEAD^^
``` ```
** Don't reset after pushing ** ** Don't reset after pushing **
----------
## Reset Workflow ## Reset Workflow
1. Edit file again 'edit_this_file.rb' 1. Edit file again 'edit_this_file.rb'
...@@ -51,11 +45,9 @@ comments: false ...@@ -51,11 +45,9 @@ comments: false
1. Pull for updates 1. Pull for updates
1. Push changes 1. Push changes
----------
## Commands ## Commands
``` ```sh
# Change file edit_this_file.rb # Change file edit_this_file.rb
git status git status
git commit -am "kjkfjkg" git commit -am "kjkfjkg"
...@@ -68,15 +60,13 @@ git pull origin master ...@@ -68,15 +60,13 @@ git pull origin master
git push origin master git push origin master
``` ```
----------
## Note ## Note
- git revert vs git reset - git revert vs git reset
- Reset removes the commit while revert removes the changes but leaves the commit - Reset removes the commit while revert removes the changes but leaves the commit
- Revert is safer considering we can revert a revert - Revert is safer considering we can revert a revert
``` ```sh
# Changed file # Changed file
git commit -am "bug introduced" git commit -am "bug introduced"
git revert HEAD git revert HEAD
......
...@@ -4,14 +4,12 @@ comments: false ...@@ -4,14 +4,12 @@ comments: false
# Git Stash # Git Stash
----------
We use git stash to store our changes when they are not ready to be committed 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:
``` ```sh
git stash save git stash save
# or # or
git stash git stash
...@@ -21,18 +19,16 @@ and we need to change to a different branch. ...@@ -21,18 +19,16 @@ and we need to change to a different branch.
- Apply stash to keep working on it: - Apply stash to keep working on it:
``` ```sh
git stash apply git stash apply
# or apply a specific one from out stack # or apply a specific one from out stack
git stash apply stash@{3} 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.
``` ```sh
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
...@@ -40,7 +36,7 @@ and we need to change to a different branch. ...@@ -40,7 +36,7 @@ and we need to change to a different branch.
- To clean our stack we need to manually remove them: - To clean our stack we need to manually remove them:
``` ```sh
# drop top stash # drop top stash
git stash drop git stash drop
# or # or
...@@ -49,19 +45,15 @@ and we need to change to a different branch. ...@@ -49,19 +45,15 @@ and we need to change to a different branch.
git stash clear git stash clear
``` ```
----------
- Apply and drop on one command: - Apply and drop on one command:
``` ```sh
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.
- Conflicts through `pop` will not drop a stash afterwards. - Conflicts through `pop` will not drop a stash afterwards.
----------
## Git Stash ## Git Stash
1. Modify a file 1. Modify a file
...@@ -72,11 +64,9 @@ and we need to change to a different branch. ...@@ -72,11 +64,9 @@ and we need to change to a different branch.
1. Apply with pop 1. Apply with pop
1. View list to confirm changes 1. View list to confirm changes
----------
## Commands ## Commands
``` ```sh
# Modify edit_this_file.rb file # Modify edit_this_file.rb file
git add . git add .
......
...@@ -9,19 +9,15 @@ comments: false ...@@ -9,19 +9,15 @@ comments: false
- For these cases we need a dependency control system. - For these cases we need a dependency control system.
- Command are painfully long so aliases are necessary. - Command are painfully long so aliases are necessary.
----------
## Subtree Aliases ## Subtree Aliases
- Add: git subtree add --prefix <target-folder> <url> <branch> --squash. - Add: `git subtree add --prefix <target-folder> <url> <branch> --squash`.
- Pull: git subtree add --prefix <target-folder> <url> <branch> --squash. - Pull: `git subtree add --prefix <target-folder> <url> <branch> --squash`.
- Push: git subtree add --prefix <target-folder> <url> <branch>. - Push: `git subtree add --prefix <target-folder> <url> <branch>`.
- Ex: git config alias.sbp 'subtree pull --prefix st / - Ex: `git config alias.sbp 'subtree pull --prefix st /
git@gitlab.com:balameb/subtree-nested-example.git master --squash'. git@gitlab.com:balameb/subtree-nested-example.git master --squash'`.
----------
``` ```sh
# Add an alias # Add an alias
# Add # Add
git config alias.sba 'subtree add --prefix st / git config alias.sba 'subtree add --prefix st /
...@@ -41,9 +37,7 @@ comments: false ...@@ -41,9 +37,7 @@ comments: false
``` ```
---------- ```sh
```
# Adding, or committing won't change the sub repo at remote # Adding, or committing won't change the sub repo at remote
# even if we push # even if we push
git add -A git add -A
......
--- ---
comments: false comments: false
type: reference
--- ---
# Tags # Tags
----------
- Useful for marking deployments and releases - Useful for marking deployments and releases
- Annotated tags are an unchangeable part of Git history - Annotated tags are an unchangeable part of Git history
- Soft/lightweight tags can be set and removed at will - Soft/lightweight tags can be set and removed at will
- Many projects combine an annotated release tag with a stable branch - Many projects combine an annotated release tag with a stable branch
- Consider setting deployment/release tags automatically - Consider setting deployment/release tags automatically
----------
# Tags # Tags
- Create a lightweight tag - Create a lightweight tag
...@@ -24,11 +21,9 @@ comments: false ...@@ -24,11 +21,9 @@ comments: false
<https://git-scm.com/book/en/Git-Basics-Tagging> <https://git-scm.com/book/en/Git-Basics-Tagging>
----------
# Commands # Commands
``` ```sh
git checkout master git checkout master
# Lightweight tag # Lightweight tag
...@@ -40,3 +35,15 @@ git tag ...@@ -40,3 +35,15 @@ git tag
git push origin --tags git push origin --tags
``` ```
<!-- ## 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, e.g. `### 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. -->
...@@ -4,8 +4,6 @@ comments: false ...@@ -4,8 +4,6 @@ comments: false
# Unstage # Unstage
----------
## Unstage ## Unstage
- To remove files from stage use reset HEAD where HEAD is the last commit of the current branch. This will unstage the file but maintain the modifications. - To remove files from stage use reset HEAD where HEAD is the last commit of the current branch. This will unstage the file but maintain the modifications.
...@@ -20,17 +18,15 @@ comments: false ...@@ -20,17 +18,15 @@ comments: false
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:
``` ```sh
git rm '*.txt' git rm '*.txt'
git rm -r <dirname> 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`:
``` ```sh
git rm <filename> --cache git rm <filename> --cache
``` ```
--- ---
comments: false comments: false
type: reference
--- ---
# GitLab Git Workshop # GitLab Git Workshop
---
## Agenda ## Agenda
1. Brief history of Git. 1. Brief history of Git.
...@@ -13,8 +12,6 @@ comments: false ...@@ -13,8 +12,6 @@ comments: false
1. Configure your environment. 1. Configure your environment.
1. Workshop. 1. Workshop.
---
## Git introduction ## Git introduction
<https://git-scm.com/about> <https://git-scm.com/about>
...@@ -26,8 +23,6 @@ comments: false ...@@ -26,8 +23,6 @@ comments: false
- Adapts to nearly any workflow. - Adapts to nearly any workflow.
- Fast, reliable and stable file format. - Fast, reliable and stable file format.
---
## Help! ## Help!
Use the tools at your disposal when you get stuck. Use the tools at your disposal when you get stuck.
...@@ -36,14 +31,10 @@ Use the tools at your disposal when you get stuck. ...@@ -36,14 +31,10 @@ Use the tools at your disposal when you get stuck.
- Use Google. - Use Google.
- Read documentation at <https://git-scm.com>. - Read documentation at <https://git-scm.com>.
---
## GitLab Walkthrough ## GitLab Walkthrough
![fit](logo.png) ![fit](logo.png)
---
## Configure your environment ## Configure your environment
- Windows: Install 'Git for Windows' - Windows: Install 'Git for Windows'
...@@ -56,8 +47,6 @@ Use the tools at your disposal when you get stuck. ...@@ -56,8 +47,6 @@ Use the tools at your disposal when you get stuck.
- Debian: '`sudo apt-get install git-all`' or Red Hat '`sudo yum install git-all`' - Debian: '`sudo apt-get install git-all`' or Red Hat '`sudo yum install git-all`'
---
## Git Workshop ## Git Workshop
### Overview ### Overview
...@@ -70,8 +59,6 @@ Use the tools at your disposal when you get stuck. ...@@ -70,8 +59,6 @@ Use the tools at your disposal when you get stuck.
1. Merge requests. 1. Merge requests.
1. Feedback and Collaboration. 1. Feedback and Collaboration.
---
## Configure Git ## Configure Git
One-time configuration of the Git client: One-time configuration of the Git client:
...@@ -81,8 +68,6 @@ git config --global user.name "Your Name" ...@@ -81,8 +68,6 @@ git config --global user.name "Your Name"
git config --global user.email you@example.com git config --global user.email you@example.com
``` ```
---
## Configure SSH Key ## Configure SSH Key
```sh ```sh
...@@ -111,8 +96,6 @@ cat ~/.ssh/id_rsa.pub ...@@ -111,8 +96,6 @@ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQEL17Ufacg8cDhlQMS5NhV8z3GHZdhCrZbl4gz you@example.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQEL17Ufacg8cDhlQMS5NhV8z3GHZdhCrZbl4gz you@example.com
``` ```
---
## Create a project ## Create a project
- Create a project in your user namespace. - Create a project in your user namespace.
...@@ -120,8 +103,6 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQEL17Ufacg8cDhlQMS5NhV8z3GHZdhCrZbl4gz you@example. ...@@ -120,8 +103,6 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQEL17Ufacg8cDhlQMS5NhV8z3GHZdhCrZbl4gz you@example.
- Create a '`development`' or '`workspace`' directory in your home directory. - Create a '`development`' or '`workspace`' directory in your home directory.
- Clone the '`training-examples`' project. - Clone the '`training-examples`' project.
---
## Commands (project) ## Commands (project)
```sh ```sh
...@@ -137,8 +118,6 @@ git clone git@gitlab.example.com:<username>/training-examples.git ...@@ -137,8 +118,6 @@ git clone git@gitlab.example.com:<username>/training-examples.git
cd training-examples cd training-examples
``` ```
---
## Git concepts ## Git concepts
### Untracked files ### Untracked files
...@@ -153,8 +132,6 @@ Files that have been modified but are not committed. ...@@ -153,8 +132,6 @@ Files that have been modified but are not committed.
Modified files that have been marked to go in the next commit. Modified files that have been marked to go in the next commit.
---
## Committing ## Committing
1. Edit '`edit_this_file.rb`' in '`training-examples`'. 1. Edit '`edit_this_file.rb`' in '`training-examples`'.
...@@ -165,8 +142,6 @@ Modified files that have been marked to go in the next commit. ...@@ -165,8 +142,6 @@ Modified files that have been marked to go in the next commit.
1. Push the commit to the remote. 1. Push the commit to the remote.
1. View the git log. 1. View the git log.
---
## Commands (committing) ## Commands (committing)
```sh ```sh
...@@ -179,8 +154,6 @@ git push origin master ...@@ -179,8 +154,6 @@ git push origin master
git log git log
``` ```
---
## Feature branching ## Feature branching
- Efficient parallel workflow for teams. - Efficient parallel workflow for teams.
...@@ -190,8 +163,6 @@ git log ...@@ -190,8 +163,6 @@ git log
- Push branches to the server frequently. - Push branches to the server frequently.
- Hint: This is a cheap backup for your work-in-progress code. - Hint: This is a cheap backup for your work-in-progress code.
---
## Feature branching steps ## Feature branching steps
1. Create a new feature branch called 'squash_some_bugs'. 1. Create a new feature branch called 'squash_some_bugs'.
...@@ -199,8 +170,6 @@ git log ...@@ -199,8 +170,6 @@ git log
1. Commit. 1. Commit.
1. Push. 1. Push.
---
## Commands (feature branching) ## Commands (feature branching)
```sh ```sh
...@@ -212,8 +181,6 @@ git commit -m 'Fix some buggy code' ...@@ -212,8 +181,6 @@ git commit -m 'Fix some buggy code'
git push origin squash_some_bugs git push origin squash_some_bugs
``` ```
---
## Merge requests ## Merge requests
- When you want feedback create a merge request. - When you want feedback create a merge request.
...@@ -224,8 +191,6 @@ git push origin squash_some_bugs ...@@ -224,8 +191,6 @@ git push origin squash_some_bugs
- Anyone can comment, not just the assignee. - Anyone can comment, not just the assignee.
- Push corrections to the same branch. - Push corrections to the same branch.
---
## Merge requests steps ## Merge requests steps
Create your first merge request: Create your first merge request:
...@@ -235,8 +200,6 @@ Create your first merge request: ...@@ -235,8 +200,6 @@ Create your first merge request:
1. Push a new commit to the same branch. 1. Push a new commit to the same branch.
1. Review the changes again and notice the update. 1. Review the changes again and notice the update.
---
## Feedback and Collaboration ## Feedback and Collaboration
- Merge requests are a time for feedback and collaboration. - Merge requests are a time for feedback and collaboration.
...@@ -246,8 +209,6 @@ Create your first merge request: ...@@ -246,8 +209,6 @@ Create your first merge request:
- Be as receptive as possible. - Be as receptive as possible.
- Feedback is about the best code, not the person. You are not your code. - Feedback is about the best code, not the person. You are not your code.
---
## Feedback and Collaboration resources ## Feedback and Collaboration resources
Review the Thoughtbot code-review guide for suggestions to follow when reviewing merge requests: Review the Thoughtbot code-review guide for suggestions to follow when reviewing merge requests:
...@@ -255,8 +216,6 @@ Review the Thoughtbot code-review guide for suggestions to follow when reviewing ...@@ -255,8 +216,6 @@ Review the Thoughtbot code-review guide for suggestions to follow when reviewing
See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce/merge_requests>. See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce/merge_requests>.
---
## Explore GitLab projects ## Explore GitLab projects
![fit](logo.png) ![fit](logo.png)
...@@ -269,8 +228,6 @@ See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce ...@@ -269,8 +228,6 @@ See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce
- Manage project members - Manage project members
- Project settings - Project settings
---
## Tags ## Tags
- Useful for marking deployments and releases. - Useful for marking deployments and releases.
...@@ -279,8 +236,6 @@ See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce ...@@ -279,8 +236,6 @@ See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce
- Many projects combine an annotated release tag with a stable branch. - Many projects combine an annotated release tag with a stable branch.
- Consider setting deployment/release tags automatically. - Consider setting deployment/release tags automatically.
---
## Tags steps ## Tags steps
1. Create a lightweight tag. 1. Create a lightweight tag.
...@@ -289,8 +244,6 @@ See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce ...@@ -289,8 +244,6 @@ See GitLab merge requests for examples: <https://gitlab.com/gitlab-org/gitlab-ce
Additional resources: <http://git-scm.com/book/en/Git-Basics-Tagging>. Additional resources: <http://git-scm.com/book/en/Git-Basics-Tagging>.
---
## Commands (tags) ## Commands (tags)
```sh ```sh
...@@ -306,8 +259,6 @@ git tag ...@@ -306,8 +259,6 @@ git tag
git push origin --tags git push origin --tags
``` ```
---
## Merge conflicts ## Merge conflicts
- Happen often. - Happen often.
...@@ -315,8 +266,6 @@ git push origin --tags ...@@ -315,8 +266,6 @@ git push origin --tags
- Practice makes perfect. - Practice makes perfect.
- Force push after fixing conflicts. Be careful! - Force push after fixing conflicts. Be careful!
---
## Merge conflicts steps ## Merge conflicts steps
1. Checkout a new branch and edit `conflicts.rb`. Add 'Line4' and 'Line5'. 1. Checkout a new branch and edit `conflicts.rb`. Add 'Line4' and 'Line5'.
...@@ -325,8 +274,6 @@ git push origin --tags ...@@ -325,8 +274,6 @@ git push origin --tags
1. Commit and push to master. 1. Commit and push to master.
1. Create a merge request. 1. Create a merge request.
---
## Merge conflicts commands ## Merge conflicts commands
After creating a merge request you should notice that conflicts exist. Resolve After creating a merge request you should notice that conflicts exist. Resolve
...@@ -343,8 +290,6 @@ git rebase --continue ...@@ -343,8 +290,6 @@ git rebase --continue
git push origin <branch> -f git push origin <branch> -f
``` ```
---
## Rebase with squash ## Rebase with squash
You may end up with a commit log that looks like this: You may end up with a commit log that looks like this:
...@@ -361,8 +306,6 @@ Does this work? ...@@ -361,8 +306,6 @@ Does this work?
Squash these in to meaningful commits using an interactive rebase. Squash these in to meaningful commits using an interactive rebase.
---
## Rebase with squash commands ## Rebase with squash commands
Squash the commits on the same branch we used for the merge conflicts step. Squash the commits on the same branch we used for the merge conflicts step.
...@@ -373,8 +316,6 @@ git rebase -i master ...@@ -373,8 +316,6 @@ git rebase -i master
In the editor, leave the first commit as 'pick' and set others to 'fixup'. In the editor, leave the first commit as 'pick' and set others to 'fixup'.
---
## Questions? ## Questions?
![fit](logo.png) ![fit](logo.png)
...@@ -383,9 +324,16 @@ Thank you for your hard work! ...@@ -383,9 +324,16 @@ Thank you for your hard work!
## Additional Resources ## Additional Resources
- GitLab Documentation: <http://docs.gitlab.com/>. See [additional resources](index.md#additional-resources).
- GUI Clients: <http://git-scm.com/downloads/guis>.
- Pro Git book: <http://git-scm.com/book>. <!-- ## Troubleshooting
- Platzi Course: <https://courses.platzi.com/courses/git-gitlab/>.
- Code School tutorial: <http://try.github.io/>. Include any troubleshooting steps that you can foresee. If you know beforehand what issues
- Contact us at `subscribers@gitlab.com`. 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, e.g. `### 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. -->
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment