git clone path/to/test/repo.git
git config push.default matching
git branch -a
* master
Scenario | Tracking set up | |
----------------------------------------------------------------------------------|----------------- | |
Clone a (non-emtpy) repo, use the branch which is checked out automatically | Y | |
Push a branch to a remote, that doesn't exist on the remote | N | |
Push a branch to a remote, that doesn't exist on the remote, with push -u | Y | |
Checkout a branch from a remote, without -t (specified or implied) | N | |
Checkout a branch from a remote, with -t (specified or implied) | Y |
These examples were created during a discussion with j416 on #github about how best to manage long-running feature branches.
The scenario is this: You have a long-running feature branch, based off master. The feature branch and master both touch the same parts of the same files, so you know that there will be conflicts when you finally merge the feature branch in. What can you do to minimise the conflicts?
# From bcrypt-ruby gem | |
require 'bcrypt' | |
class User | |
include DataMapper::Resource | |
attr_accessor :password, :password_confirmation | |
property :id, Serial | |
property :username, String, :required => true, :length => (2..32), :unique => true | |
property :password_hash, String, :length => 60 |