benthayer / benthayer/git-gud

Level: Basics 5 - "Branch/Merge"

Open
#249 0 comments 0 reactions 1 assignee Claimed by @benthayer View on GitHub
level - educational
Dominant language
Python
Stars
558
Forks
53
PR merge metrics
No merged PRs in 30d

Description

```
Demonstrate the process of checking out and merging. To replace "basics branching"
```

This level demonstrates that you can check out branches and merge them to combine their files. It doesn't make an effort to show what branches are.

The branching structure would be like this:
`setup.spec`
```
1
2 (master)
3 : 1 (branch)
branch
```
`test.spec`
```
1
2
3 : 1 (branch)
M : 2 3 (master)
master
```

`gg solution`
```
git checkout master
git merge branch
```

Similar to #248 and others, we would have `git gud status` output showing the state of the different commits
```
Working Directory
intro.txt - "Once upon a time there was a princess"
middle.txt - "She lived a fulfilling life"
ending.txt - "And then she died"
Staging Area
intro.txt - "Once upon a time there was a princess"
middle.txt - "She lived a fulfilling life"
ending.txt - "And then she died"
Commit 1
intro.txt - "Once upon a time there was a princess"
Commit 2
intro.txt - "Once upon a time there was a princess"
middle.txt - "She lived a fulfilling life"
Commit 3 (branch)
intro.txt - "Once upon a time there was a princess"
ending.txt - "And then she died"
Merge (master)
intro.txt - "Once upon a time there was a princess"
middle.txt - "She lived a fulfilling life"
ending.txt - "And then she died"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.