git-squash 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/lib/git-squash.rb +3 -3
- data/lib/git-squash/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d973605edf9cf14cb1011412c33cd97f6eebb1a
|
4
|
+
data.tar.gz: eb56a087023e359d595eb379f9009d6ce8309d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef7b0750a96b15d6f70b077154e34bd47d67b4f924c64ee367b4834d558ddbefd482469bace22ae1a5dbc453d9a0209b53f70e660fbb016540a6e8fff9ba5dbe
|
7
|
+
data.tar.gz: 36cac28373372a9da2aeefa56581170c78476064fb8c94df61d761b8e73226799723c5ee1acb68c42128067c97969762be455b85931144ec938cebe7adfc4c56
|
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
###Git shortcut to automate the commit, squash and push commands
|
2
2
|
|
3
|
-
Sometimes
|
3
|
+
Sometimes executing basic git commands is very boring and repetitive so, this shortcut will help you a lot. It will run these commands in this sequence:
|
4
4
|
|
5
|
-
-
|
5
|
+
- `git merge-base HEAD YOUR_CURRENT_BRANCH`
|
6
6
|
- `git reset --soft MERGE_BASE_ID`
|
7
7
|
- `git add .`
|
8
8
|
- `git commit -m "YOUR_MESSAGE_COMMIT"`
|
9
9
|
- `git push origin -f YOUR_CURRENT_BRANCH`
|
10
10
|
|
11
|
-
|
11
|
+
Warnings:
|
12
|
+
- #1: This procedures clears all the commit history. So do not run it if you'll need this history.
|
13
|
+
- #2: This script run a force commit. So, be careful.
|
12
14
|
|
13
15
|
**The Script is similar to:**
|
14
16
|
|
@@ -27,7 +29,7 @@ echo -e "$(tput setaf 2)\n** Executing add command$(tput sgr0)\n"
|
|
27
29
|
git add .
|
28
30
|
|
29
31
|
echo -e "$(tput setaf 2)\n** Executing commit command$(tput sgr0)\n"
|
30
|
-
git commit -
|
32
|
+
git commit -S -am "$COMMIT_MESSAGE"
|
31
33
|
|
32
34
|
echo -e "$(tput setaf 2)\n** Executing push command$(tput sgr0)\n"
|
33
35
|
git push origin -f $CURRENT_BRANCH
|
@@ -54,6 +56,7 @@ or
|
|
54
56
|
```bash
|
55
57
|
git-squash "Commit Message"
|
56
58
|
```
|
59
|
+
*Ps. The default branch is `master`*
|
57
60
|
|
58
61
|
or
|
59
62
|
|
data/lib/git-squash.rb
CHANGED
@@ -24,9 +24,9 @@ class GitSquash
|
|
24
24
|
|
25
25
|
def commit_command
|
26
26
|
puts "Executing commit command".green
|
27
|
-
puts "git commit -
|
27
|
+
puts "git commit -S -am #{ message }".yellow
|
28
28
|
puts
|
29
|
-
%x(git commit -
|
29
|
+
%x(git commit -S -am "#{ message }")
|
30
30
|
end
|
31
31
|
|
32
32
|
def add_command
|
@@ -59,7 +59,7 @@ class GitSquash
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def message
|
62
|
-
@argv[0] || 'no message
|
62
|
+
@argv[0] || 'no commit message'
|
63
63
|
end
|
64
64
|
|
65
65
|
def get_repo
|
data/lib/git-squash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-squash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adriano Tadao Sabadini Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.5.1
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: git shortcut to join all commits in just one
|