Skip to content

Commit 1ca554c

Browse files
committed
deltag.sh now delete how much tags as you need
1 parent adaab01 commit 1ca554c

File tree

5 files changed

+55
-62
lines changed

5 files changed

+55
-62
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/nbproject
2+
.idea/

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
gitscripts
22
==========
33

4-
[![version](https://img.shields.io/badge/version-2.6.1-green.svg)](https://github.com/steevanb/gitscripts/tree/2.6.1)
4+
[![version](https://img.shields.io/badge/version-2.7.0-green.svg)](https://github.com/steevanb/gitscripts/tree/2.7.0)
5+
![Lines](https://img.shields.io/badge/code%20lines-665-green.svg)
56
![Total Downloads](https://poser.pugx.org/steevanb/gitscripts/downloads)
67

78
Some bash scripts to help you using git.
@@ -15,7 +16,7 @@ Available scripts
1516

1617
[addtag.sh](doc/addtag.md) : add a tag and push all tags
1718

18-
[deltag.sh](doc/deltag.md) : delete a tag, and push only deleted tag
19+
[deltag.sh](doc/deltag.md) : delete tags, and push only deleted tags
1920

2021
[push.sh](doc/push.md) : push only the current branch to origin
2122

deltag.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ if [ $# == 0 ]; then
66
cancelScript "You must pass tag name as first parameter."
77
fi
88

9-
tag=$1
9+
for tag in $*; do
10+
title "Delete tag $tag"
11+
execCmd "git tag -d $tag"
12+
execCmd "git push origin :refs/tags/$tag"
13+
done
1014

11-
title "Delete tag $tag"
12-
execCmd "git tag -d $tag"
13-
execCmd "git push origin :refs/tags/$tag"
14-
15-
echoOk
15+
echoOk

doc/changelog.md

Lines changed: 42 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,73 @@
1-
2.6.1 (2016-08-19)
2-
------------------
1+
### [2.7.0](../../../compare/2.6.1...2.7.0) - 2017-07-21
32

4-
- [[status.sh](status.md)] Hide git log errors
5-
- [[status.sh](status.md)] Add yellow message "Branch does not exist on origin"
6-
- [[status.sh](status.md)] Add red message with git log error code when error occured
7-
- Add $fonrColor parameter to smallBlock()
8-
- [[status.sh](status.md)] Change font color from white to black for yellow messages (Commits needs to be pushed and Branch does not exist on origin)
3+
- [deltag.sh](deltag.md) Now delete how much tags as you need
4+
- [status.sh](status.md) Call git fetch to refresh git cache when commits need to be pushed
5+
6+
### [2.6.1](../../../compare/2.6.0...2.6.1) - 2016-08-19
97

10-
2.6.0 (2016-02-27)
11-
------------------
8+
- [status.sh](status.md) Hide git log errors
9+
- [status.sh](status.md) Add yellow message "Branch does not exist on origin"
10+
- [status.sh](status.md) Add red message with git log error code when error occured
11+
- Add $fonrColor parameter to smallBlock()
12+
- [status.sh](status.md) Change font color from white to black for yellow messages (Commits needs to be pushed and Branch does not exist on origin)
1213

13-
- [[status.sh](status.md)] Add -show-current-path-title parameters
14-
- [[rebase.sh](rebase.md)] Call status.sh with -show-current-path-title=no -max-depth=1 parameters
14+
### [2.6.0](../../../compare/2.5.0...2.6.0) - 2016-02-27
1515

16+
- [status.sh](status.md) Add -show-current-path-title parameters
17+
- [rebase.sh](rebase.md) Call status.sh with -show-current-path-title=no -max-depth=1 parameters
1618

17-
2.5.0 (2015-01-18)
18-
------------------
19+
### [2.5.0](../../../compare/2.4.1...2.5.0) - 2015-01-18
1920

20-
- [[renamebranch.sh](renamebranch.md)] Add renamebranch.sh, who rename local branch and push change to origin
21+
- [renamebranch.sh](renamebranch.md) Add renamebranch.sh, who rename local branch and push change to origin
2122

22-
2.4.1 (2015-12-07)
23-
------------------
23+
### [2.4.1](../../../compare/2.4.0...2.4.1) - 2015-12-07
2424

2525
- Fix "HEAD détachée" repository status in status.sh
2626

27-
2.4.0 (2015-11-26)
28-
----------------
27+
### [2.4.0](../../../compare/2.3.0...2.4.0) - 2015-11-26
2928

30-
- [[deluntrackedbranch.sh](deluntrackedbranch.md)] List untracked branch by default, use --force to really delete them
29+
- [deluntrackedbranch.sh](deluntrackedbranch.md)] List untracked branch by default, use --force to really delete them
3130

32-
2.3.0 (2015-09-03)
33-
----------------
31+
### [2.3.0](../../../compare/2.2.2...2.3.0) - 2015-09-03
3432

35-
- [[changelog.md](changelog.md)] Add changelog
36-
- [[status.sh](status.md)] Documentation for -show-detached parameter
37-
- [[deluntrackedbranch.sh](deluntrackedbranch.md)] Add deluntrackedbranch.sh
33+
- [changelog.md](changelog.md) Add changelog
34+
- [status.sh](status.md) Documentation for -show-detached parameter
35+
- [deluntrackedbranch.sh](deluntrackedbranch.md) Add deluntrackedbranch.sh
3836

39-
2.2.2 (2015-05-04)
40-
------------------
37+
### [2.2.2](../../../compare/2.2.1...2.2.2) - 2015-05-04
4138

42-
- [composer.json] Add composer.json
39+
- Add composer.json
4340

44-
2.2.1 (2015-05-04)
45-
------------------
41+
### [2.2.1](../../../compare/2.2.0...2.2.1) - 2015-05-04
4642

47-
- [[rebase.sh](rebase.md)] Add rebase.sh parameters to git push call (ex : rebase.sh -f will now call git push -f origin foo)
48-
- [[rebase.sh](rebase.md)] Fix countEditedFiles calculation
43+
- [rebase.sh](rebase.md) Add rebase.sh parameters to git push call (ex : rebase.sh -f will now call git push -f origin foo)
44+
- [rebase.sh](rebase.md) Fix countEditedFiles calculation
4945

50-
2.2.0 (2015-04-30)
51-
------------------
46+
### [2.2.0](../../../compare/2.1.0...2.2.0) - 2015-04-30
5247

53-
- [[rebase.sh](rebase.md)] Add rebase.sh, to rebase your branch from another branch. Ask you if you want to stash your changes before, and pop them after rebase.
48+
- [rebase.sh](rebase.md) Add rebase.sh, to rebase your branch from another branch. Ask you if you want to stash your changes before, and pop them after rebase.
5449
- Add color to executed commands
5550

56-
2.1.0 (2015-04-29)
57-
------------------
51+
### [2.1.0](../../../compare/2.0.1...2.1.0) - 2015-04-29
5852

59-
- [[push.sh](push.md)] Add push.sh, to push only current branch to origin.
60-
- [[status.sh](status.md)] Add -show-detached parameter, to show or hide detached repositories.
61-
- [[status.sh](status.md)] Add -max-depth parameter, to indicate at which depth status.sh will try to find git. repositories
53+
- [push.sh](push.md) Add push.sh, to push only current branch to origin.
54+
- [status.sh](status.md) Add -show-detached parameter, to show or hide detached repositories.
55+
- [status.sh](status.md) Add -max-depth parameter, to indicate at which depth status.sh will try to find git. repositories
6256

63-
2.0.1 (2014-07-08)
64-
------------------
57+
### [2.0.1](../../../compare/2.0.0...2.0.1) - 2014-07-08
6558

66-
- [[status.sh](status.md)] Add -show-uptodate parameter, to show or hide repositories without changes (use it to see if status.sh find all your repositories for example).
67-
- [[status.sh](status.md)] Fix find call, to find git repositories.
59+
- [status.sh](status.md) Add -show-uptodate parameter, to show or hide repositories without changes (use it to see if status.sh find all your repositories for example).
60+
- [status.sh](status.md) Fix find call, to find git repositories.
6861

69-
2.0.0 (2014-06-23)
70-
------------------
62+
### [2.0.0](../../../compare/1.0.0...2.0.0) - 2014-06-23
7163

72-
- [[status.sh](status.md)] Rename gitstatus.sh to status.sh.
73-
- [[addtag.sh](addtag.md)] Add addtag.sh, to add and push new tag.
74-
- [[deltag.sh](deltag.md)] Add deltag.sh, to delete a git tag.
64+
- [status.sh](status.md) Rename gitstatus.sh to status.sh.
65+
- [addtag.sh](addtag.md) Add addtag.sh, to add and push new tag.
66+
- [deltag.sh](deltag.md) Add deltag.sh, to delete a git tag.
7567

76-
1.0.0 (2014-04-28)
77-
------------------
68+
### 2.0.0- 2014-04-28
7869

79-
- [[gitstatus.sh](status.md)] Simple and colored format for git status, and try to find git repositories in sub directories (like vendor).
70+
- [gitstatus.sh](status.md) Simple and colored format for git status, and try to find git repositories in sub directories (like vendor).
8071

8172

8273
[Back to index](../README.md)

doc/deltag.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
deltag.sh
22
=========
33

4-
deltag.sh delete a tag, and push only this deleted tag.
4+
deltag.sh delete tags, and push only this deleted tags.
55

66
Parameters
77
----------
88
```
9-
$tag
10-
First parameter is tag name, most of the time a version number (like 1.0.0).
9+
$tag1 $tag2 $tag3
1110
```
1211

1312
Example
1413
-------
1514
```
1615
./deltag.sh 1.0.0
16+
./deltag.sh 1.0.1 1.0.2
1717
```
1818

1919
[Back to index](../README.md)

0 commit comments

Comments
 (0)