slide2.md 1.21 KB
Newer Older
French, Robert's avatar
French, Robert committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Branches for Fun and Profit

## Hacking the Inspirational Quote Generator
Let's practice some branching basics inside of a running project.

### Setup
Follow the setup instructions on the [Inspirational Quote Generator README](https://code.ornl.gov/git-it-together/inspirational-quote-generator).
I suggest you fork a copy of the above repo to your own user page.

### Making changes
The default quotes are not very inspirational. Let's make some changes in a new
branch:

```bash
git checkout -b increase-inspirationality-of-quotes
```

Now you are free to make whatever changes you would like!

### Committing Changes
First, let's make sure the tests still pass:

```bash
./bin/test.sh
```

If so, we can commit our changes:

```bash
git commit -am "Improving the motivational quality of quotes"
```

### Pushing changes to Gitlab
As we did earlier, if we want to get a second set of eyeballs on the quotes, we
can push them to gitlab as such:

```bash
git push -u origin increase-inspirationality-of-quotes
```

### Merging into master
Once we are happy with the changes, we can merge them into master like this:

```bash
git checkout master
git merge increase-inspirationality-of-quotes
```

[previous](slide1.md) | [next](slide3.md)