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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c6bce93d7b1b948e4b38376f39203fab12d9d88
4
- data.tar.gz: e14dee1d4497a07de18c17e47557c6424631fc2b
3
+ metadata.gz: 3d973605edf9cf14cb1011412c33cd97f6eebb1a
4
+ data.tar.gz: eb56a087023e359d595eb379f9009d6ce8309d87
5
5
  SHA512:
6
- metadata.gz: b1cd3c87c1c1265df407d3c7902faa07d409e6817deb7d58fdc0738bf0fd0dd19b44a9c18fea21b22481d06cf99e64c9f32e2bde7932d082fa9d1b1b4079c7af
7
- data.tar.gz: e73c811e0b62e91a89dcc637aedade7ad997af774dc46fcf3604224654e0ce964ba222da623af9dc4b637512988de26db00f43b7f5ecf01f300db3b72b7c7a9f
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 execute the basic git commands is very boring and repetitive so, this shortcut is awesome. It will run these commands in this order:
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
- - get the MERGE_BASE_ID
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
- Warning: This procedures clears the commits history. So do not run it if you'll need this history.
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 -m "$COMMIT_MESSAGE"
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 -m #{ message }".yellow
27
+ puts "git commit -S -am #{ message }".yellow
28
28
  puts
29
- %x(git commit -m "#{ message }")
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 commit'
62
+ @argv[0] || 'no commit message'
63
63
  end
64
64
 
65
65
  def get_repo
@@ -1,3 +1,3 @@
1
1
  class GitSquash
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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: 2015-10-28 00:00:00.000000000 Z
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.4.8
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