git_chain 0.1.0 → 0.1.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -4
  3. data/lib/git_chain/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0408b010a9f6dc0f650d7c6b030d8931efdd203280c38315fd4dbc7e8ff028f6'
4
- data.tar.gz: 56fdd878c6db64c6bd46a27221738af9792a1939441d0a2dc804c3796219d750
3
+ metadata.gz: 1d10b1d1d8aeeb25f7e63ebd82f29259e06ab8c78c6d2b499954062abc9b2b90
4
+ data.tar.gz: c9d0787527d8a90c154a440f19bf626a0f91107ea0371197f9b56e44b1fa6602
5
5
  SHA512:
6
- metadata.gz: 965d5146bb629f8e2cf3e89adeaece924518f0db2324980773e20dbed338920c9a6290844211e7546344c138a1e6f543bc1ed269e8f683a92b9c5d76b5e22643
7
- data.tar.gz: 95056638dea4d53d9d5ac065b76680a009a9415c0ff025488086fb087b015a4bcb2b2d274841279082a794314aacb2a908baa344c43de5e1f8abe17cf430b679
6
+ metadata.gz: b3d68f79be20659a5967e5a49dd0c2e52fbe1dd63f399f4b45d421b9eb5dde9e8c1b6af607d8f52e8f312e6b06d4ce12b58837d316e5d5feb2ccf8cc669be3a2
7
+ data.tar.gz: e92ab72e1bb85bb1ebd44f3b0fc4bd7a9f0c6750efba20c1fe8cbe914390955a3f6c6c80c229d961176d1bebdd47ecedf497c99cff7f2afc8672d461ae6868a6
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # GitChain
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/git_chain`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ GitChain helps solve the feature branch dependency problem, in which you have several branches lined up for either active work or release, one depndent on the next, when one or more of the upstream branches changes (because of a rebase on trunk with merge conflicts, or some other last minute fix) and you then have to chain rebase --onto all of your downstream branches.
4
+
5
+ This is particularly a problem for large projects with a slow and strict release cycle. A feature branch might be worked on for a week or so, and during development you discover a refactor or enhancement that ought not to be blocked by your current work so you break it up into it's own branch. However, you would like to use that change in your current work, so you base your branch off of it.
4
6
 
5
- TODO: Delete this and the text above, and describe your gem
6
7
 
7
8
  ## Installation
8
9
 
9
- Add this line to your application's Gemfile:
10
+ Add this line to your application's Gemfile under the development section:
10
11
 
11
12
  ```ruby
12
13
  gem 'git_chain'
@@ -20,9 +21,30 @@ Or install it yourself as:
20
21
 
21
22
  $ gem install git_chain
22
23
 
24
+ Then, you must add .git_chains to your .gitignore or you're gonna have a bad time.
25
+
23
26
  ## Usage
24
27
 
25
- TODO: Write usage instructions here
28
+ ### Initialize a chain
29
+
30
+ ```ruby
31
+ git chain add <parent_branch> [current_base]
32
+ ```
33
+
34
+ This command creates or updates a chain with the **current_branch** as the child and the **parent_branch** as the parent. It does not make any modifications to your repository - it only updates the .git_chains file with the new entry.
35
+
36
+ By default **current_base** will be the merge_base between master and the **current_branch**, you can pass in an abritrary sha or another branch name if **current_branch** already has a base other than master.
37
+
38
+
39
+ ### Rebase a chain
40
+
41
+ ```ruby
42
+ git chain rebase [all]
43
+ ```
44
+
45
+ Rebase will lookup the chain for the **current_branch**, perform rebase --onto of the **current_base** onto the **parent_branch**, and then update the **current_base** to be the new merge_base between the **current_branch** and the **parent_branch**.
46
+
47
+ Rebase all will traverse the chain entries until it finds a link with **master** as the parent, and then perform the rebase onto command all the way back up.
26
48
 
27
49
  ## Development
28
50
 
@@ -1,3 +1,3 @@
1
1
  module GitChain
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_chain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan McGarvey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-10 00:00:00.000000000 Z
11
+ date: 2019-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git