• This repository has been archived on 11/May/2022
  • Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 16 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

non-sucky git externals

giternal is unmaintained

If you want the functionality that giternal provides, but in a tool that’s being maintained, you should consider:

Thanks to @jwhitley for the suggested alternatives.

Installation

‘gem install giternal`

Why giternal

There are a couple tools out there that keep track of git externals for you. Git submodules are built in, and braid is a different project. They both have problems that prevent them from using those externals collaboratively.

In a nutshell, git submodules keep a reference to the head of each external project. This means that if Joe and Sarah each make non-conflicting changes to their externals, and push the external reference in the main project, one of them will get a conflict on update. Braid doesn’t treat the externals as being separate from the main project, so any commits you make will go to the parent instead of the external.

In order to demonstrate these issues more concretely, I’ve written a script that will simulate the workflow of making changes to an external, pushing it upstream, and pulling it into another project. You’ll notice in the submodule example that there’s a conflict when updating the main repo, and files are missing in the local external after update. In the braid example, the changes never make it upstream. This script checks to see if a tool allows you to not only track dependencies but collaborate as well. To execute it, run

ruby test_trackers.rb giternal|submodules|braid

Using it

Put a file in your project named .giternal.yml or config/giternal.yml, that looks like this:

local_dir_name:
  repo: git://path/to/repo.git
  path: local/sub/dir

As an example, here’s how you’d track rspec:

rspec:
  repo: git://github.com/dchelimsky/rspec.git
  path: vendor/plugins

To pull the externals into your workspace, run “giternal update”. You should add vendor/plugins/rspec to .gitignore to keep the files from being added to your main repo.

Deploying externals

I frequently use a cap task that changes to deploy_root and runs “giternal update” to pull all the externals. The downside with this approach is that you’ll get the bleeding edge of your external, and you may want to use a particular version that you’ve tested and know works with your app. Enter freezing.

Make sure your working dir is clean and then run “giternal freeze”. The externals are no longer separate repos - the history was zipped up so that the external can be unfrozen later. Each external is added to the git index, so all you have to do is commit. You’ve got a self-contained external that is frozen to a working version, suitable for deploy.

After you’ve tagged your release, you can unfreeze the giternal with “giternal unfreeze” and get back to development.

How I want to work with externals

When tracking externals, the most important thing is knowing my libraries work together, and second I can try to stay up to date. When I update an external, I would run rake. If it passes, keep that version. If not, look at what it would take to take for my code and the library code to work. If I feel like I can do it, I do, otherwise I unfreeze and stay on the older working version.

THANK YOUs

Rollcall of awesome people who have contributed to giternal:

Brian Takita & Honkster Team - ability to specify individual repos for

freeze/unfreeze/update

Copyright © 2009-2011 Pat Maddox. See LICENSE for details.

More Repositories

1

no-peeping-toms

NOTE: This functionality is included in Rails 3.1 and above. Disables observers during testing, allowing you to write model tests that are completely decoupled from the observer. Also lets you enable observers for a certain block of code, so that you can write observer tests
Ruby
136
star
2

rspec-plugin-generator

Plugin generator that uses RSpec stubs instead of Test::Unit. Also sets up database connections for testing against an isolated database.
Ruby
51
star
3

hexarch2

some demonstration of alistair cockburn's hexagonal architecture (+ event sourcing + CQRS)
Ruby
19
star
4

publish-tinderbox-to-devonthink

Publish from Tinderbox to DEVONthink
16
star
5

ex_freebsd

mix tasks for converting Elixir projects to FreeBSD packages.
Elixir
11
star
6

redline-quickstart

Ruby
9
star
7

starter-app

Skeleton Rails app with rake tasks for getting RSpec quickly
Ruby
9
star
8

tinderbox-to-pdf

Create Beautiful PDFs From Your Tinderbox Documents
6
star
9

with_context

Provides the ability to define methods in certain contexts
Ruby
6
star
10

instance_validations

Add validations directly to instances of your AR model, not just at the class-level
Ruby
5
star
11

ecb

mirror of emacs code browser
5
star
12

rspec-mode.el

emacs mode for rspec
Emacs Lisp
5
star
13

renoise-tools

tools I make for renoise!
Lua
5
star
14

method_matching

Sexier method_missing
Ruby
5
star
15

action_flow

Dynamic workflow for Rails controllers
Ruby
4
star
16

sailthru

An ActionMailer-like API for Sailthru mailing service
Ruby
4
star
17

alias_alias_alias

alias alias alias!!
4
star
18

data_kata

Ruby
3
star
19

slime

See https://github.com/slime/slime
Common Lisp
3
star
20

home

There's no place like it
Shell
3
star
21

test_exemplars

A less sucky way to do fixtures, sort of
Ruby
3
star
22

kindle-explorer

This is my OS X app to view and export notes & highlights from my Kindle
Objective-C
3
star
23

acts_as_value_object

Value objects for ActiveRecord
2
star
24

blackjack

Ruby
2
star
25

string-expand_path

Provides an #expand_path method to String
Ruby
2
star
26

scit

git-like interface for sound cloud
Ruby
2
star
27

legacy_preso

Ruby
2
star
28

friendry

Friend stuff for Ruby
Ruby
2
star
29

incentives

the amazing incentive engine
JavaScript
2
star
30

rspec2rails2

Ruby
1
star
31

cdp_exploration

Shell
1
star
32

wavetables

Software for making wavetable audio files for use in UVI Falcon.
Ruby
1
star
33

palindromeday.com

JavaScript
1
star
34

object_inspector

TODO: one-line summary of your gem
Ruby
1
star
35

oi_demo_blog

Ruby
1
star
36

rubywebconf

Twitter 2.0 example from Ruby|Web conference code immersion
Ruby
1
star
37

apress_daily_deal

An RSS feed generator for Apress Deal of the Day
Ruby
1
star
38

foodstr

foodstr
Ruby
1
star
39

scidept-hittracker

Ruby
1
star
40

rspec2rails2-dev

Ruby
1
star
41

proc_to_awesome

Spreading OCP by letting people inject whatever Ruby code they want
Ruby
1
star
42

midi_cleaner

Elixir
1
star
43

simple_port_example

Example of a really simple FreeBSD port
Makefile
1
star
44

bdd-setup

test project to verify that you have bdd components installed
Ruby
1
star
45

emacs-old

my emacs config
1
star
46

showandtell

1
star
47

has_components

Configurable components, wicked easy has_many :through
Ruby
1
star
48

basic_rails_app

Just a basic rails app
Ruby
1
star
49

elixir-release-port

Elixir
1
star
50

future_assets

1
star
51

scratch_pad

A scratch pad of code that I'm experimenting with
CoffeeScript
1
star
52

ex_ample

Example elixir app with FreeBSD package build
Elixir
1
star
53

encode_field

field encoding for your activerecords
Ruby
1
star
54

callback_hunter

a rails 2 plugin to track down the evil callback problem
Ruby
1
star
55

barks_of_love

BOL app
Ruby
1
star
56

sfzer

1
star
57

emacs-config-old

emacs config of Pat Maddox
Emacs Lisp
1
star
58

icloud_to_gcal

Syncs anonymized events from multiple iCloud calendars to a single google calendar (can be used with calendly)
Ruby
1
star
59

demo_rails3_app

Ruby
1
star
60

twinkies

Twitter links RSS
Ruby
1
star
61

reaper-scripts

Lua
1
star