git-utils 1.0.0 → 2.0.0
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 +7 -7
- data/bin/{git-merge-branch → git-merge-into-branch} +3 -3
- data/lib/git-utils/merge_branch.rb +2 -2
- data/lib/git-utils/version.rb +1 -1
- data/spec/commands/merge_branch_spec.rb +4 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c558401be11b46c831946e0d92fc292c9f559c7992ead65979373bc0d4703a49
|
4
|
+
data.tar.gz: 3e3d7516ce925568cf030f2391ff72de690affefc363febe203420bc60b818d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c92927ab40c200212b7891affeb7f111012b205d873cf86a2846db362b4c4b6d97134aba209dc96ee870c681a3d2b1e6fdb6bac2bf6fcee88127f7cf1fb5c154
|
7
|
+
data.tar.gz: 1eaa0ece4ba1638bd21e7724b384e21f41acc0416dc349a6bcb69c9f39036610fb7ee9c5d9d19db472562dc8b2446d196994fbcd4ae054d89cbe4eea3f0a53f7
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ The `git-utils` used to be pure Bash scripts, but they are now available as a Ru
|
|
13
13
|
* `git amend`: alias for `git commit --amend`
|
14
14
|
* `git bump`: makes a commit with the message "Bump version number"
|
15
15
|
* `git cleanup`: deletes every branch already merged into current branch (apart from `master`, `staging`, `development`, and any branches listed in `~/.git-cleanup-preserved`). Pass the `-r` option to delete remote merged branches.
|
16
|
-
* `git merge-branch [branch]`: merges current branch into given branch (defaults to `master`)
|
16
|
+
* `git merge-into-branch [branch]`: merges current branch into given branch (defaults to `master`)
|
17
17
|
* `git minor`: makes a commit with the message "Make minor changes"
|
18
18
|
* `git open`: opens the remote page for the repo (OS X & Linux)
|
19
19
|
* `git polish`: makes a commit with the message "Polish"
|
@@ -30,17 +30,17 @@ The `git-utils` used to be pure Bash scripts, but they are now available as a Ru
|
|
30
30
|
|
31
31
|
Here are some suggested aliases:
|
32
32
|
|
33
|
-
git config --global alias.
|
34
|
-
git config --global alias.pr
|
35
|
-
git config --global alias.pb
|
33
|
+
git config --global alias.mib merge-into-branch
|
34
|
+
git config --global alias.pr pull-request
|
35
|
+
git config --global alias.pb push-branch
|
36
36
|
|
37
37
|
## Further details
|
38
38
|
|
39
39
|
Some of these commands deserve further explanation.
|
40
40
|
|
41
|
-
### git merge-branch
|
41
|
+
### git merge-into-branch
|
42
42
|
|
43
|
-
`git merge-branch [target]` merges the current branch into the target branch (defaults to `master`). On a branch called `add-markdown-support`, `git merge-branch` is equivalent to the following:
|
43
|
+
`git merge-into-branch [target]` merges the current branch into the target branch (defaults to `master`). On a branch called `add-markdown-support`, `git merge-into-branch` is equivalent to the following:
|
44
44
|
|
45
45
|
$ git checkout master
|
46
46
|
$ git merge --no-ff --log add-markdown-support
|
@@ -51,7 +51,7 @@ Note that this effectively changes the default merge behavior from fast-forward
|
|
51
51
|
|
52
52
|
In addition, the `--log` option puts the commit messages from the individual commits in the merge message, which is especially useful for viewing the full diff represented by the commit.
|
53
53
|
|
54
|
-
These options can be overriden (and thus restored to their defaults) by passing the options `-ff` or `--no-log`. `git merge-branch` accepts any options valid for `git merge`.
|
54
|
+
These options can be overriden (and thus restored to their defaults) by passing the options `-ff` or `--no-log`. `git merge-into-branch` accepts any options valid for `git merge`.
|
55
55
|
|
56
56
|
### git push-branch
|
57
57
|
|
@@ -3,9 +3,9 @@ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
|
3
3
|
require 'git-utils/merge_branch'
|
4
4
|
|
5
5
|
# Merges the current branch into the given branch (defaults to master).
|
6
|
-
# E.g., 'git merge-branch foobar' merges the current branch into foobar.
|
7
|
-
# 'git merge-branch', merges the current branch into master.
|
8
|
-
# git merge-branch uses the --no-ff --log options to ensure that the
|
6
|
+
# E.g., 'git merge-into-branch foobar' merges the current branch into foobar.
|
7
|
+
# 'git merge-into-branch', merges the current branch into master.
|
8
|
+
# git merge-into-branch uses the --no-ff --log options to ensure that the
|
9
9
|
# merge creates a new commit object and that the individual commits appear
|
10
10
|
# in the log file.
|
11
11
|
exit Command.run!(MergeBranch, ARGV.dup)
|
@@ -4,7 +4,7 @@ class MergeBranch < Command
|
|
4
4
|
|
5
5
|
def parser
|
6
6
|
OptionParser.new do |opts|
|
7
|
-
opts.banner = "Usage: git merge-branch [branch] [options]"
|
7
|
+
opts.banner = "Usage: git merge-into-branch [branch] [options]"
|
8
8
|
opts.on_tail("-h", "--help", "this usage guide") do
|
9
9
|
puts opts.to_s; exit 0
|
10
10
|
end
|
@@ -32,4 +32,4 @@ class MergeBranch < Command
|
|
32
32
|
def target_branch
|
33
33
|
self.known_options.first || 'master'
|
34
34
|
end
|
35
|
-
end
|
35
|
+
end
|
data/lib/git-utils/version.rb
CHANGED
@@ -8,7 +8,7 @@ describe MergeBranch do
|
|
8
8
|
|
9
9
|
its(:cmd) { should match /git merge/ }
|
10
10
|
|
11
|
-
shared_examples "merge-branch with known options" do
|
11
|
+
shared_examples "merge-into-branch with known options" do
|
12
12
|
subject { command }
|
13
13
|
it "should not raise an error" do
|
14
14
|
expect { command.parse }.not_to raise_error(OptionParser::InvalidOption)
|
@@ -26,13 +26,13 @@ describe MergeBranch do
|
|
26
26
|
|
27
27
|
describe "with some unknown options" do
|
28
28
|
let(:command) { MergeBranch.new(['dev', '-o', '-a', '-z', '--foo']) }
|
29
|
-
it_should_behave_like "merge-branch with known options"
|
29
|
+
it_should_behave_like "merge-into-branch with known options"
|
30
30
|
its(:cmd) { should match /-a -z --foo/ }
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "command-line command" do
|
34
|
-
subject { `bin/git-merge-branch --debug development` }
|
34
|
+
subject { `bin/git-merge-into-branch --debug development` }
|
35
35
|
it { should match /git checkout development/ }
|
36
36
|
it { should match /git merge --no-ff --log/ }
|
37
37
|
end
|
38
|
-
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hartl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Add some Git utilities
|
14
14
|
email:
|
@@ -19,7 +19,7 @@ executables:
|
|
19
19
|
- git-cleanup
|
20
20
|
- git-delete-remote-branch
|
21
21
|
- git-graph
|
22
|
-
- git-merge-branch
|
22
|
+
- git-merge-into-branch
|
23
23
|
- git-minor
|
24
24
|
- git-open
|
25
25
|
- git-polish
|
@@ -45,7 +45,7 @@ files:
|
|
45
45
|
- bin/git-cleanup
|
46
46
|
- bin/git-delete-remote-branch
|
47
47
|
- bin/git-graph
|
48
|
-
- bin/git-merge-branch
|
48
|
+
- bin/git-merge-into-branch
|
49
49
|
- bin/git-minor
|
50
50
|
- bin/git-open
|
51
51
|
- bin/git-polish
|