diff options
author | Evan Read <eread@gitlab.com> | 2018-11-13 09:07:16 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2019-01-08 05:21:09 +0300 |
commit | d98560c1f5c54127d1a48c4c8e326bbf06c31c4b (patch) | |
tree | b2d2fc26829e0a7b25da18d09a1e7e07ba1efed8 /doc/university/training | |
parent | 710f2ec50c49d1e773acc20058ed584f1402de33 (diff) |
Make unordered lists conform to styleguide
- Also makes other minor Markdown fixes that were near the main fixes.
Diffstat (limited to 'doc/university/training')
-rw-r--r-- | doc/university/training/end-user/README.md | 17 | ||||
-rw-r--r-- | doc/university/training/topics/getting_started.md | 14 | ||||
-rw-r--r-- | doc/university/training/topics/git_add.md | 10 | ||||
-rw-r--r-- | doc/university/training/topics/git_log.md | 10 | ||||
-rw-r--r-- | doc/university/training/topics/merge_conflicts.md | 9 | ||||
-rw-r--r-- | doc/university/training/topics/rollback_commits.md | 14 | ||||
-rw-r--r-- | doc/university/training/topics/stash.md | 15 | ||||
-rw-r--r-- | doc/university/training/topics/subtree.md | 18 | ||||
-rw-r--r-- | doc/university/training/topics/unstage.md | 8 |
9 files changed, 58 insertions, 57 deletions
diff --git a/doc/university/training/end-user/README.md b/doc/university/training/end-user/README.md index 701533358c8..637e4e3c791 100644 --- a/doc/university/training/end-user/README.md +++ b/doc/university/training/end-user/README.md @@ -242,10 +242,11 @@ git push origin squash_some_bugs --- ### Merge Conflicts -* Happen often -* Learning to fix conflicts is hard -* Practice makes perfect -* Force push after fixing conflicts. Be careful! + +- Happen often +- Learning to fix conflicts is hard +- Practice makes perfect +- Force push after fixing conflicts. Be careful! --- @@ -306,10 +307,10 @@ Create a merge request on the GitLab web UI. You'll see a conflict warning. ### 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/ +- 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/> --- diff --git a/doc/university/training/topics/getting_started.md b/doc/university/training/topics/getting_started.md index 66cb08feacb..d76ff57bfa3 100644 --- a/doc/university/training/topics/getting_started.md +++ b/doc/university/training/topics/getting_started.md @@ -8,12 +8,12 @@ comments: false ## Instantiating Repositories -* Create a new repository by instantiating it through +- Create a new repository by instantiating it through: ```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> @@ -23,9 +23,9 @@ comments: false ## Central Repos -* To instantiate a central repository a `--bare` flag is required. -* Bare repositories don't allow file editing or committing changes. -* Create a bare repo with +- To instantiate a central repository a `--bare` flag is required. +- Bare repositories don't allow file editing or committing changes. +- Create a bare repo with: ```bash git init --bare project-name.git @@ -97,5 +97,5 @@ git log ## Note -* git fetch vs pull -* Pull is git fetch + git merge +- git fetch vs pull +- Pull is git fetch + git merge diff --git a/doc/university/training/topics/git_add.md b/doc/university/training/topics/git_add.md index b1483e725fe..e02a7deab91 100644 --- a/doc/university/training/topics/git_add.md +++ b/doc/university/training/topics/git_add.md @@ -10,13 +10,13 @@ comments: false Adds content to the index or staging area. -* Adds a list of file +- Adds a list of file: ```bash git add <files> ``` -* Adds all files including deleted ones +- Adds all files including deleted ones: ```bash git add -A @@ -26,19 +26,19 @@ Adds content to the index or staging area. ## Git add continued -* Add all text files in current dir +- Add all text files in current dir: ```bash git add *.txt ``` -* Add all text file in the project +- Add all text file in the project: ```bash git add "*.txt*" ``` -* Adds all files in directory +- Adds all files in directory: ```bash git add views/layouts/ diff --git a/doc/university/training/topics/git_log.md b/doc/university/training/topics/git_log.md index 6ba6f9eb69d..127fdf4d44a 100644 --- a/doc/university/training/topics/git_log.md +++ b/doc/university/training/topics/git_log.md @@ -8,19 +8,19 @@ comments: false Git log lists commit history. It allows searching and filtering. -* Initiate log +- Initiate log: ``` git log ``` -* Retrieve set number of records: +- Retrieve set number of records: ``` 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" @@ -28,13 +28,13 @@ Git log lists commit history. It allows searching and filtering. ---------- -* Search by comment message. +- Search by comment message: ``` git log --grep="<pattern>" ``` -* Search by date +- Search by date: ``` git log --since=1.month.ago --until=3.weeks.ago diff --git a/doc/university/training/topics/merge_conflicts.md b/doc/university/training/topics/merge_conflicts.md index 071baddf508..a7d42904229 100644 --- a/doc/university/training/topics/merge_conflicts.md +++ b/doc/university/training/topics/merge_conflicts.md @@ -68,7 +68,8 @@ git push origin conflicts_branch -f ---------- ## Note -* 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/ + +- 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/> diff --git a/doc/university/training/topics/rollback_commits.md b/doc/university/training/topics/rollback_commits.md index 44304634f36..ca3a64e4347 100644 --- a/doc/university/training/topics/rollback_commits.md +++ b/doc/university/training/topics/rollback_commits.md @@ -8,13 +8,13 @@ comments: false ## 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^ ``` -* Add files and change message with: +- Add files and change message with: ``` git commit --amend -m "New Message" @@ -22,13 +22,13 @@ comments: false ---------- -* Undo last and remove changes +- Undo last and remove changes: ``` 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^^ @@ -73,9 +73,9 @@ 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 +- 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 diff --git a/doc/university/training/topics/stash.md b/doc/university/training/topics/stash.md index 42eedea14e5..f1c91fb1b37 100644 --- a/doc/university/training/topics/stash.md +++ b/doc/university/training/topics/stash.md @@ -9,7 +9,7 @@ comments: false 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. -* Stash +- Stash: ``` git stash save @@ -19,7 +19,7 @@ and we need to change to a different branch. 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 @@ -29,7 +29,7 @@ and we need to change to a different branch. ---------- -* 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. ``` @@ -38,7 +38,7 @@ stashes. 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 @@ -51,15 +51,14 @@ stashes. ---------- -* Apply and drop on one command +- Apply and drop on one command: ``` git stash pop ``` -* If we meet conflicts we need to either reset or commit our changes. - -* Conflicts through `pop` will not drop a stash afterwards. +- If we meet conflicts we need to either reset or commit our changes. +- Conflicts through `pop` will not drop a stash afterwards. ---------- diff --git a/doc/university/training/topics/subtree.md b/doc/university/training/topics/subtree.md index b5a892dc17b..ba7c3394938 100644 --- a/doc/university/training/topics/subtree.md +++ b/doc/university/training/topics/subtree.md @@ -4,20 +4,20 @@ comments: false # Subtree -* Used when there are nested repositories. -* Not recommended when the amount of dependencies is too large -* For these cases we need a dependency control system -* Command are painfully long so aliases are necessary +- Used when there are nested repositories. +- Not recommended when the amount of dependencies is too large. +- For these cases we need a dependency control system. +- Command are painfully long so aliases are necessary. ---------- ## Subtree Aliases -* Add: 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> -* Ex: git config alias.sbp 'subtree pull --prefix st / - git@gitlab.com:balameb/subtree-nested-example.git master --squash' +- Add: 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>. +- Ex: git config alias.sbp 'subtree pull --prefix st / + git@gitlab.com:balameb/subtree-nested-example.git master --squash'. ---------- diff --git a/doc/university/training/topics/unstage.md b/doc/university/training/topics/unstage.md index ee7913637b9..da36a3218e5 100644 --- a/doc/university/training/topics/unstage.md +++ b/doc/university/training/topics/unstage.md @@ -8,13 +8,13 @@ comments: false ## Unstage -* 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 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 git checkout -- <file> @@ -22,14 +22,14 @@ comments: false ---------- -* 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> ``` -* 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 |