Commit 7d48778c authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'add-university-content' into 'master'

Add university content

## What does this MR do?

Imports gitlab-org/University content into doc/university to deprecate university.gitlab.com and access it from doc.gitlab.com/universtiy.

## Are there points in the code the reviewer needs to double check?

That there are no broken links.

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added

## What are the relevant issue numbers?

#22449

See merge request !6520
parents e8cce313 5608daa1
...@@ -14,6 +14,7 @@ v 8.13.0 (unreleased) ...@@ -14,6 +14,7 @@ v 8.13.0 (unreleased)
- Optimize GitHub importing for speed and memory - Optimize GitHub importing for speed and memory
v 8.12.2 (unreleased) v 8.12.2 (unreleased)
- Added University content to doc/university
- Fix Import/Export not recognising correctly the imported services. - Fix Import/Export not recognising correctly the imported services.
- Fix snippets pagination - Fix snippets pagination
- Fix List-Unsubscribe header in emails - Fix List-Unsubscribe header in emails
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
- [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
- [University](university/README.md) Learn Git and GitLab through videos and courses.
## Administrator documentation ## Administrator documentation
......
## What is GitLab University
_GitLab University_ has as a goal to teach the fundamentals of **Version Control with Git and GitLab** through courses that cover topics which can be mastered in around 2 hours.
_University materials don't replace our [Documentation](http://docs.gitlab.com) or [Blog Articles](https://about.gitlab.com/blog/)._
---
### On this page
+ [GITx] Git
+ [OPSx] DevOps
+ [GLBx] GitLab Basics
+ [INTx] GitLab Integrations
+ [GLFx] GitLab Workflows
+ [GLEx] GitLab Enterprise Edition extra features
+ [GCIx] GitLab CI
+ [ECO] Ecosystem
+ [COM] Competition comparison
+ [SPTx] Support Bootcamp
+ [SLSx] Sales Bootcamp
+ [TRAx] Trainings
---
+ [GIT1] [Version Control Systems](https://docs.google.com/presentation/d/16sX7hUrCZyOFbpvnrAFrg6tVO5_yT98IgdAqOmXwBho/edit#slide=id.g72f2e4906_2_29)
+ [GIT2] [Operating Systems and How Git Works](https://drive.google.com/a/gitlab.com/file/d/0B41DBToSSIG_OVYxVFJDOGI3Vzg/view?usp=sharing)
+ [GIT3] [Intro to Git](https://www.codeschool.com/account/courses/try-git)
---
+ [OPS1] [What is Omnibus](https://www.youtube.com/watch?v=XTmpKudd-Oo)
+ [OPS2] [Installing GitLab](https://www.youtube.com/watch?v=Q69YaOjqNhg)
+ [OPS3] [Configuring an external PostgreSQL database](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#using-a-non-packaged-postgresql-database-management-server)
+ [OPS5] [Importing from Other Tools or SVN](http://doc.gitlab.com/ee/workflow/importing/)
+ [OPS6] [High Availability Documentation](https://about.gitlab.com/high-availability/)
+ [OPS7] [Managing LDAP, Active Directory](https://www.youtube.com/watch?v=HPMjM-14qa8)
+ [OPS8] [Scalability and High Availability](https://www.youtube.com/watch?v=cXRMJJb6sp4&list=PLFGfElNsQthbQu_IWlNOxul0TbS_2JH-e&index=2)
+ [OPS9] [High Availability on AWS](high-availability/aws/README.md)
---
+ [GLB1] [Terminology](glossary/README.md)
+ [GLB2] [GitLab Basics](http://doc.gitlab.com/ce/gitlab-basics/README.html)
+ [GLB3] [Demo of GitLab.com](https://www.youtube.com/watch?v=WaiL5DGEMR4)
+ [GLB4] [Create and Add your SSH key to GitLab](https://www.youtube.com/watch?v=54mxyLo3Mqk)
+ [GLB5] [Repositories, Projects and Groups](https://www.youtube.com/watch?v=4TWfh1aKHHw&index=1&list=PLFGfElNsQthbQu_IWlNOxul0TbS_2JH-e)
+ [GLB6] [Creating a Project in GitLab](https://www.youtube.com/watch?v=7p0hrpNaJ14)
+ [GLB7] [Issues and Merge Requests](https://www.youtube.com/watch?v=raXvuwet78M)
+ [GLB8] [Big files in Git (Git LFS, Annex)](https://gitlab.com/gitlab-org/University/blob/master/classes/git_lfs_and_annex.md)
---
+ [INT1] [JIRA and Jenkins integrations in GitLab](https://gitlabmeetings.webex.com/gitlabmeetings/ldr.php?RCID=44b548147a67ab4d8a62274047146415)
+ [INT2] [Integrating JIRA with GitLab](http://doc.gitlab.com/ee/integration/jira.html)
+ [INT3] [Integrating Jenkins with GitLab](http://doc.gitlab.com/ee/integration/jenkins.html)
+ [INT4] [Integrating Bamboo with GitLab](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/project_services/bamboo.md)
+ [INT5] [Documentation on Integrating Slack with GitLab](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/slack.md)
---
+ [GLF1] [GitLab Flow](https://www.youtube.com/watch?v=UGotqAUACZA)
---
+ [GLE1] [Configuring an external MySQL database](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#using-a-mysql-database-management-server-enterprise-edition-only)
+ [GLE2] [Managing Permissions within EE](https://www.youtube.com/watch?v=DjUoIrkiNuM)
+ [GLE3] [Upcoming in EE and Big files in Git (Git LFS, Annex)](https://gitlab.com/gitlab-org/University/blob/master/classes/upcoming_in_ee.md)
---
+ [GCI1] [GitLab CI product page](https://about.gitlab.com/gitlab-ci/)
+ [GCI2] [Setting up GitLab Runner For Continuous Integration](https://about.gitlab.com/2016/03/01/gitlab-runner-with-docker/)
---
+ [COM1] [GitLab compared to other tools](https://about.gitlab.com/comparison/)
+ [COM2] [Compare GitLab versions](https://about.gitlab.com/features/#compare)
+ [COM3] [Innersourcing article](https://about.gitlab.com/2014/09/05/innersourcing-using-the-open-source-workflow-to-improve-collaboration-within-an-organization/)
---
+ [ECO1] [Ecosystem Overview](https://www.youtube.com/watch?v=sXlhgPK1NTY&list=PLFGfElNsQthbQu_IWlNOxul0TbS_2JH-e&index=6)
+ [ECO2] [Positioning FAQ](https://about.gitlab.com/handbook/positioning-faq)
+ [ECO3] [GitLab Ecosystem slides](https://docs.google.com/presentation/d/1vCU-NbZWz8NTNK8Vu3y4zGMAHb5DpC8PE5mHtw1PWfI/edit)
+ [ECO4] [Customer Use-Cases](https://about.gitlab.com/handbook/use-cases/)
---
+ [SPT1] [Support Path](support/README.md)
+ [SPT2] [End User Training Material](https://gitlab.com/gitlab-org/University/blob/master/training/user_training.md)
+ [SPT3] [Materials for Training Sessions](https://gitlab.com/gitlab-org/University/tree/master/training/topics)
---
+ [SLS1] [Sales Path (redirect to sales handbook)](https://about.gitlab.com/handbook/sales-onboarding/)
+ [SLS2] [GitLab Direction](https://about.gitlab.com/direction/)
---
+ [TRA1] [End User Training](training/end-user/README.md)
---
### External Resources
+ [DOC] GitLab Documentation
+ [Set up and use GitLab Pages](http://doc.gitlab.com/ee/pages/README.html)
+ [Markdown Reference](http://doc.gitlab.com/ce/markdown/markdown.html)
+ [GLW] GitLab Workshop (@ Platzi)
+ [GitLab Workshop Part 1: Basics of Git and GitLab](https://courses.platzi.com/classes/git-gitlab/)
+ [Create a GitLab Account](https://courses.platzi.com/classes/git-gitlab/concepto/first-steps/create-an-account-on-gitlab/material/)
+ [GLY] GitLab YouTube Videos
+ [Making GitLab Great for Everyone, our response to the Dear GitHub letter](https://www.youtube.com/watch?v=GGC40y4vMx0)
+ [Compared to Atlassian (Recorded on 2016-03-03) ](https://youtu.be/Nbzp1t45ERo)
+ [GLI] GitLab Team-Only Access
+ [GitLab architecture for noobs](https://dev.gitlab.org/gitlab/gitlabhq/blob/master/doc/development/architecture.md)
+ [Client Assessment of GitLab versus GitHub](https://docs.google.com/a/gitlab.com/spreadsheets/d/18cRF9Y5I6I7Z_ab6qhBEW55YpEMyU4PitZYjomVHM-M/edit?usp=sharing)
+ [KNT] Slides & Keynotes by GitLabbers & other individuals
+ [Why Git and GitLab slide deck](https://docs.google.com/a/gitlab.com/presentation/d/1RcZhFmn5VPvoFu6UMxhMOy7lAsToeBZRjLRn0LIdaNc/)
+ [Git Workshop](https://docs.google.com/presentation/d/1JzTYD8ij9slejV2-TO-NzjCvlvj6mVn9BORePXNJoMI/)
+ Others (not created by GitLab)
+ [Dev Ops terminology](https://xebialabs.com/glossary/)
+ [Continuous Delivery vs Continuous Deployment](https://www.youtube.com/watch?v=igwFj8PPSnw)
+ [Periodic Table of DevOps Tools](https://xebialabs.com/periodic-table-of-devops-tools/)
+ [State of Dev Ops 2015 Report by Puppet Labs](https://puppetlabs.com/sites/default/files/2015-state-of-devops-report.pdf) Insightful Chapters to understand the Impact of Continuous Delivery on Performance (Chapter 4), the Application Architecture (Chapter 5) and How IT Managers can help their teams win (Chapter 6).
+ [2011 WSJ article by Mark Andreeson - Software is Eating the World](http://www.wsj.com/articles/SB10001424053111903480904576512250915629460)
+ [2014 Blog post by Chris Dixon - Software eats software development](http://cdixon.org/2014/04/13/software-eats-software-development/)
+ [2015 Venture Beat article - Actually, Open Source is Eating the World](http://venturebeat.com/2015/12/06/its-actually-open-source-software-thats-eating-the-world/)
+ [Customer review of GitLab with talking points on why they prefer GitLab](https://www.enovate.co.uk/web-design-blog/2015/11/25/gitlab-review/)
+ [3rd party tool comparison](http://technologyconversations.com/2015/10/16/github-vs-gitlabs-vs-bitbucket-server-formerly-stash/)
+ [Amazon's transition to Continuous Delivery](https://www.youtube.com/watch?v=esEFaY0FDKc)
+ [Article on Continuous Integration from ThoughtWorks](https://www.thoughtworks.com/continuous-integration)
This diff is collapsed.
This diff is collapsed.
---
title: University | Process
---
## Suggesting improvements
If you would like to teach a class or participate or help in any way please
submit a merge request and assign it to [Job](https://gitlab.com/u/JobV).
If you have suggestions for additional courses you would like to see,
please submit a merge request to add an upcoming class, assign to
[Chad](https://gitlab.com/u/chadmalchow) and /cc [Job](https://gitlab.com/u/JobV).
## Adding classes
1. All training materials of any kind should be added to [GitLab CE](https://gitlab.com/gitlab-org/gitlab-ce/)
to ensure they are available to a broad audience (don't use any other repo or
storage for training materials).
1. Don't make materials that are needlessly specific to one group of people, try
to keep the wording broad and inclusive (don't make things for only GitLab Inc.
people, only interns, only customers, etc.).
1. To allow people to contribute all content should be in git.
1. The content can go in a subdirectory under `/doc/university/`.
1. To make, view or modify the slides of the classes use [Deckset](http://www.decksetapp.com/)
or [RevealJS](http://lab.hakim.se/reveal-js/). Do not use Powerpoint or Google
Slides since this prevents everyone from contributing.
1. Please upload any video recordings to our Youtube channel. We prefer them to
be public, if needed they can be unlisted but if so they should be linked from
this page.
1. Please create a merge request and assign to [SeanPackham](https://gitlab.com/u/SeanPackham).
This diff is collapsed.
# Training
This training material is the markdown used to generate training slides
which can be found at [End User Slides](https://gitlab-org.gitlab.io/end-user-training-slides/#/)
through it's [RevealJS](https://gitlab.com/gitlab-org/end-user-training-slides)
project.
---
## Git Intro
---
### What is a Version Control System (VCS)
- Records changes to a file
- Maintains history of changes
- Disaster Recovery
- Types of VCS: Local, Centralized and Distributed
---
### Short Story of Git
- 1991-2002: The Linux kernel was being maintaned by sharing archived files
and patches.
- 2002: The Linux kernel project began using a DVCS called BitKeeper
- 2005: BitKeeper revoked the free-of-charge status and Git was created
---
### What is Git
- Distributed Version Control System
- Great branching model that adapts well to most workflows
- Fast and reliable
- Keeps a complete history
- Disaster recovery friendly
- Open Source
---
### Getting Help
- Use the tools at your disposal when you get stuck.
- Use `git help <command>` command
- Use Google (i.e. StackOverflow, Google groups)
- Read documentation at https://git-scm.com
---
## Git Setup
Workshop Time!
---
### Setup
- Windows: Install 'Git for Windows'
- https://git-for-windows.github.io
- Mac: Type `git` in the Terminal application.
- If it's not installed, it will prompt you to install it.
- Linux
- Debian: `sudo apt-get install git-all`
- Red Hat `sudo yum install git-all`
---
### Configure
- One-time configuration of the Git client:
```bash
git config --global user.name "Your Name"
git config --global user.email you@example.com
```
- If you don't use the global flag you can setup a different author for
each project
- Check settings with:
```bash
git config --global --list
```
- You might want or be required to use an SSH key.
- Instructions: [SSH](http://doc.gitlab.com/ce/ssh/README.html)
---
### Workspace
- Choose a directory on you machine easy to access
- Create a workspace or development directory
- This is where we'll be working and adding content
---
```bash
mkdir ~/development
cd ~/development
-or-
mkdir ~/workspace
cd ~/workspace
```
---
## Git Basics
---
### Git Workflow
- Untracked files
- New files that Git has not been told to track previously.
- Working area (Workspace)
- Files that have been modified but are not committed.
- Staging area (Index)
- Modified files that have been marked to go in the next commit.
- Upstream
- Hosted repository on a shared server
---
### GitLab
- GitLab is an application to code, test and deploy.
- Provides repository management with access controls, code reviews,
issue tracking, Merge Requests, and other features.
- The hosted version of GitLab is gitlab.com
---
### New Project
- Sign in into your gitlab.com account
- Create a project
- Choose to import from 'Any Repo by URL' and use https://gitlab.com/gitlab-org/training-examples.git
- On your machine clone the `training-examples` project
---
### Git and GitLab basics
1. Edit `edit_this_file.rb` in `training-examples`
2. See it listed as a changed file (working area)
3. View the differences
4. Stage the file
5. Commit
6. Push the commit to the remote
7. View the git log
---
```shell
# Edit `edit_this_file.rb`
git status
git diff
git add <file>
git commit -m 'My change'
git push origin master
git log
```
---
### Feature Branching
1. Create a new feature branch called `squash_some_bugs`
2. Edit `bugs.rb` and remove all the bugs.
3. Commit
4. Push
---
```shell
git checkout -b squash_some_bugs
# Edit `bugs.rb`
git status
git add bugs.rb
git commit -m 'Fix some buggy code'
git push origin squash_some_bugs
```
---
## Merge Request
---
### Merge requests
- When you want feedback create a merge request
- Target is the ‘default’ branch (usually master)
- Assign or mention the person you would like to review
- Add `WIP` to the title if it's a work in progress
- When accepting, always delete the branch
- Anyone can comment, not just the assignee
- Push corrections to the same branch
---
### Merge request example
- Create your first merge request
- Use the blue button in the activity feed
- View the diff (changes) and leave a comment
- Push a new commit to the same branch
- Review the changes again and notice the update
---
### Feedback and Collaboration
- Merge requests are a time for feedback and collaboration
- Giving feedback is hard
- Be as kind as possible
- Receiving feedback is hard
- Be as receptive as possible
- 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:[Thoughtbot](https://github.com/thoughtbot/guides/tree/master/code-review)
- See GitLab merge requests for examples: [Merge Requests](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests)
---
## Merge Conflicts
---
### Merge Conflicts
* Happen often
* Learning to fix conflicts is hard
* Practice makes perfect
* Force push after fixing conflicts. Be careful!
---
### Example Plan
1. Checkout a new branch and edit conflicts.rb. Add 'Line4' and 'Line5'.
2. Commit and push
3. Checkout master and edit conflicts.rb. Add 'Line6' and 'Line7' below 'Line3'.
4. Commit and push to master
5. Create a merge request and watch it fail
6. Rebase our new branch with master
7. Fix conflicts on the conflicts.rb file.
8. Stage the file and continue rebasing
9. Force push the changes
10. Finally continue with the Merge Request
---
### Example 1/2
git checkout -b conflicts_branch
# vi conflicts.rb
# Add 'Line4' and 'Line5'
git commit -am "add line4 and line5"
git push origin conflicts_branch
git checkout master
# vi conflicts.rb
# Add 'Line6' and 'Line7'
git commit -am "add line6 and line7"
git push origin master
---
### Example 2/2
Create a merge request on the GitLab web UI. You'll see a conflict warning.
git checkout conflicts_branch
git fetch
git rebase master
# Fix conflicts by editing the files.
git add conflicts.rb
# No need to commit this file
git rebase --continue
# Remember that we have rewritten our commit history so we
# need to force push so that our remote branch is restructured
git push origin conflicts_branch -f
---
### Notes
* When to use `git merge` and when to use `git rebase`
* Rebase when updating your branch with master
* Merge when bringing changes from feature to master
* Reference: https://www.atlassian.com/git/tutorials/merging-vs-rebasing/
---
## Revert and Unstage
---
### Unstage
To remove files from stage use reset HEAD. Where HEAD is the last commit of the current branch:
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:
git checkout -- <file>
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>
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
---
### Undo Commits
Undo last commit putting everything back into the staging area:
git reset --soft HEAD^
Add files and change message with:
git commit --amend -m "New Message"
Undo last and remove changes
git reset --hard HEAD^
Same as last one but for two commits back:
git reset --hard HEAD^^
Don't reset after pushing
---
### Reset Workflow
1. Edit file again 'edit_this_file.rb'
2. Check status
3. Add and commit with wrong message
4. Check log
5. Amend commit
6. Check log
7. Soft reset
8. Check log
9. Pull for updates
10. Push changes
----
# Change file edit_this_file.rb
git status
git commit -am "kjkfjkg"
git log
git commit --amend -m "New comment added"
git log
git reset --soft HEAD^
git log
git pull origin master
git push origin master
---
### Note
git revert vs git reset
Reset removes the commit while revert removes the changes but leaves the commit
Revert is safer considering we can revert a revert
# Changed file
git commit -am "bug introduced"
git revert HEAD
# New commit created reverting changes
# Now we want to re apply the reverted commit
git log # take hash from the revert commit
git revert <rev commit hash>
# reverted commit is back (new commit created again)
---
## Questions
---
## Instructor Notes
---
### Version Control
- Local VCS was used with a filesystem or a simple db.
- Centralized VCS such as Subversion includes collaboration but
still is prone to data loss as the main server is the single point of
failure.
- Distributed VCS enables the team to have a complete copy of the project
and work with little dependency to the main server. In case of a main
server failing the project can be recovered by any of the latest copies
from the team
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