Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
git-seminar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maximilian Konzack
git-seminar
Commits
b278b484
Verified
Commit
b278b484
authored
6 years ago
by
ck85nori
Browse files
Options
Downloads
Patches
Plain Diff
improves branch merge chapter
parent
c2fa1c83
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
basics.html
+47
-19
47 additions, 19 deletions
basics.html
with
47 additions
and
19 deletions
basics.html
+
47
−
19
View file @
b278b484
...
@@ -771,11 +771,31 @@
...
@@ -771,11 +771,31 @@
# branch and merge
# branch and merge
notes:
notes:
- what was this **master** again?
- this is a demo chapter, you'll all do this in collaboration
chapter (next one)
- what was this **master** again? we haven't explained yet
</section>
</section>
<section
id=
"branches"
data-markdown
>
<section
id=
"branch-visual"
data-markdown
>
## branches
## branches visualized

notes:
- we can take a lot away from this small example
- create a branch to have a separate history
- branch is a name attached to a commit
- the name advances when a new commit is made
- **master** is a naming convention for the default branch
- switch back and forth
- always imagine git history as a directed graph
- graph is drawn with new top and old bottom
- commit points to its parent
- git commands modify the graph
</section>
<section
id=
"branch-commands"
data-markdown
>
## branch commands
```bash
```bash
# show your local branches
# show your local branches
...
@@ -792,36 +812,40 @@
...
@@ -792,36 +812,40 @@
```
```
notes:
notes:
- use wip/feature as branch name, see motivation playground
```
- use git lol frequently to showcase its importance
# branch, branch --all
- make changes in playground
git lol # show branches
- git push
# branch wip/feature, lol
- make changes in master
# checkout wip/feature, lol
- git lol
# edit, commit, lol
- make changes in playground
# push, lol
```
- always `lol` because visual representation helps understanding
</section>
</section>
<section
id=
"branch-names"
data-markdown
>
<section
id=
"branch-names"
data-markdown
>
## branch naming
## branch naming
### conventions
### conventions
- dashes in names
```bash
- slashes for categories
# slashes for categories
```markdown
topic/ui/input-form
wip/test-different-fonts
hotfix/42
hotfix/42
release/1.6.0
release/1.6.0
# dashes in names
wip/font-changes
# nesting is allowed
topic/ui/input-form
```
```
notes:
notes:
- `git branch --list 'topic/*'`
- `git branch --list 'topic/*'`
- decide with your team
- decide with your team
- write CONTRIBUTING.md
- write
`
CONTRIBUTING.md
`
</section>
</section>
<section
id=
"merging"
data-markdown
>
<section
id=
"
branch-
merging"
data-markdown
>
## resolving branches
## resolving branches
```bash
```bash
...
@@ -834,7 +858,11 @@
...
@@ -834,7 +858,11 @@
```
```
notes:
notes:
- use git lol to show final layout
```
# checkout master, lol
# merge wip/feature, lol
# branch -d wip/feature, lol
```
</section>
</section>
</section>
</section>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment