git_commands 3.1.7 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -9
- data/lib/git_commands/command.rb +1 -1
- data/lib/git_commands/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67b5256b61bb6187f47f4b24fe7220750b022b55
|
4
|
+
data.tar.gz: 9a40a26fbfb14155999237513714678a379943df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3358e46e6c0a3f3d84709e4ed8cdb46503c47c23dc1f4bf6ac6dbad26650314b6d5c5c6cf8e8c1a0d77152ecc8e27f7e3e39b6950f5e8605c4f9d883e66fc22
|
7
|
+
data.tar.gz: b29fd122148138fc29b0a7ef6e3d53eb2c01630c363bc57afaf194b81ff0d89b7be4de91bdd2ce5d42a6dd3698fffb1e35d68d5f4a6edb48dc9cc85de35f4d86
|
data/README.md
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
* [Workflow](#workflow)
|
3
3
|
* [Scope](#scope)
|
4
4
|
* [Installation](#installation)
|
5
|
-
* [
|
5
|
+
* [GIT](#git)
|
6
6
|
* [Usage](#usage)
|
7
7
|
* [Arguments](#help)
|
8
8
|
* [Help](#help)
|
9
9
|
* [Repository](#repository)
|
10
10
|
* [Branches](#branches)
|
11
11
|
* [Commands](#commands)
|
12
|
-
* [
|
13
|
-
* [
|
14
|
-
* [
|
12
|
+
* [Rebase](#rebase)
|
13
|
+
* [Purge](#purge)
|
14
|
+
* [Aggregate](#aggregate)
|
15
15
|
|
16
16
|
## Workflow
|
17
17
|
This script will facilitate adopting a subset of the branch-featuring workflow characterised by:
|
@@ -31,8 +31,9 @@ Just install the gem to use the binaries commands.
|
|
31
31
|
gem install git_commands
|
32
32
|
```
|
33
33
|
|
34
|
-
###
|
35
|
-
The library uses the Ruby command line execution to invoke the **git** command
|
34
|
+
### GIT
|
35
|
+
The library uses the Ruby command line execution to invoke the **git** command as a separate process.
|
36
|
+
I assume you have the GIT program on your path.
|
36
37
|
|
37
38
|
## Usage
|
38
39
|
Here are the main commands:
|
@@ -108,10 +109,21 @@ Loading branches file...
|
|
108
109
|
Branch 'noent' does not exist!
|
109
110
|
```
|
110
111
|
|
112
|
+
##### Master branch
|
113
|
+
Master branch cannot be included into the branches list for obvious reasons (from useless to dangerous ones).
|
114
|
+
An error is raised in case master branch is specified:
|
115
|
+
|
116
|
+
```
|
117
|
+
rebase --repo=./Sites/greatest_hits --branches=master
|
118
|
+
|
119
|
+
Loading branches file...
|
120
|
+
Commands cannot interact directly with 'master' branch!
|
121
|
+
```
|
122
|
+
|
111
123
|
### Commands
|
112
124
|
Here are the available GIT commands:
|
113
125
|
|
114
|
-
####
|
126
|
+
#### Rebase
|
115
127
|
This is probably the most useful command in case you have several branches to rebase with _origin/master_ frequently.
|
116
128
|
A confirmation is asked to before rebasing.
|
117
129
|
|
@@ -120,7 +132,7 @@ rebase --repo=./Sites/greatest_hits --branches=feature/love_me_tender,feature/te
|
|
120
132
|
...
|
121
133
|
```
|
122
134
|
|
123
|
-
####
|
135
|
+
#### Purge
|
124
136
|
This command remove the specified branches locally and remotely.
|
125
137
|
A confirmation is asked before removal.
|
126
138
|
|
@@ -129,7 +141,7 @@ purge --repo=/temp/top_20 --branches=release/in_the_ghetto
|
|
129
141
|
...
|
130
142
|
```
|
131
143
|
|
132
|
-
####
|
144
|
+
#### Aggregate
|
133
145
|
This command aggregates all of the specified branches into a single one in case you want to create a release branch.
|
134
146
|
It uses the following naming convention: *release/yyyy_mm_dd*
|
135
147
|
A confirmation is asked before aggregating.
|
data/lib/git_commands/command.rb
CHANGED
@@ -116,7 +116,7 @@ module GitCommands
|
|
116
116
|
|
117
117
|
private def check_branch(branch)
|
118
118
|
Dir.chdir(@repo) do
|
119
|
-
fail(GitError, "
|
119
|
+
fail(GitError, "Commands cannot interact directly with 'master' branch!") if branch == "master"
|
120
120
|
fail(GitError, "Branch '#{branch}' does not exist!") unless self.class.valid_branch?(branch)
|
121
121
|
end
|
122
122
|
end
|
data/lib/git_commands/version.rb
CHANGED