Skip to content
Permalink
Browse files
finished gitflow section
  • Loading branch information
aa7401 committed Jun 12, 2017
1 parent 0c1902d commit 517319135a0ac6058f8434690b80853cc9e9f5ca
Showing 1 changed file with 32 additions and 6 deletions.
@@ -341,23 +341,23 @@ And if we checkout the master branch we will see that it contains our working co

Try running the script and input an invalid code, what happens. The chances are that the error message is printed but then the script continues to execute! This is a serious but in our release code and we will need to implement a _hotfix_.
```
$ git flow hotfix start 'v1.0.1'
Switched to a new branch 'hotfix/v1.0.1'
$ git flow hotfix start '1.0.1'
Switched to a new branch 'hotfix/1.0.1'
Summary of actions:
- A new branch 'hotfix/v1.0.1' was created, based on 'master'
- You are now on branch 'hotfix/v1.0.1'
- A new branch 'hotfix/1.0.1' was created, based on 'master'
- You are now on branch 'hotfix/1.0.1'
Follow-up actions:
- Start committing your hot fixes
- Bump the version number now!
- When done, run:
git flow hotfix finish 'v1.0.1'
git flow hotfix finish '1.0.1'
```
Now you need to fix the issue by adding the line `process.exit()` to each error handling block. Once you have finished, you need to commit the changes and then _finish_ the hotfix. Use the tag `v1.0.1`.
```
$ git flow hotfix finish 'v1.0.1'
$ git flow hotfix finish '1.0.1'
Branches 'master' and 'origin/master' have diverged.
And local branch 'master' is ahead of 'origin/master'.
Switched to branch 'master'
@@ -382,3 +382,29 @@ $ git flow hotfix finish 'v1.0.1'
- You are now on branch 'develop'
```
If you switch between the `develop` and `master` branches you will see that your _hotfix_ has been applied to both.

### Pushing the Tags

By default, all the tags are local only and don't get pushed to your GitHub remote. Lets start by listing the local tags.
```
$ git tag
1.0.0
1.0.1
```
And to see the tags on the remote (this returns nothing).
```
$ it ls-remote --tags origin
```
To push our tags to the remote.
```
$ git push origin --tags
```

```
$ git ls-remote --tags origin
dd94793b69a8307157baf82011edfb2607b9b17a refs/tags/1.0.0
12fe99ca9326b10b54f1a06ccda7724694791e9d refs/tags/1.0.0^{}
0f3fbe765b99cab3039d35d8bdfdd912d5e5a9fa refs/tags/v1.0.1
53babbaeeb07a49def0e77405576a6a316750a8e refs/tags/v1.0.1^{}
```
If you are using GitHub, these tags can be accessed under the **releases** tab where the tagged code can be downloaded.

0 comments on commit 5173191

Please sign in to comment.