The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Github::Import - Import your project into http://github.com

SYNOPSIS

    # You can see your token at https://github.com/account
    % cd some_project_in_git
    % github-import --username jrockway --token decafbad --add-remote --push-mode all

You can also create a config file. Here is an example using a real man's editor:

    % git config --add github.user jrockway
    % git config --add github.token 91ceb00b1es
    % git config --add github-import.remote origin # if you don't like "github"
    % cd some_other_project_in_git
    % github-import

DESCRIPTION

This class/script provides a way to import a git repository into http://github.com.

CONFIGURATION

The standard git configuration file is used to obtain values for the attributes listed below.

If no value is specified in the config file, the default one in the documentation will be used.

For instance to not push to github, set:

    [github-import]
        push: false

You can override on the command line by specifying --no-push or --push depending on what you have in the file and what is the default.

All variables are taken from github-import except username and token which also fall back to github.user and github.token.

ATTRIBUTES

dry_run

If true nothing will actually be done, but the output will be printed.

This is a YAML file containing values for attributes.

config_file

Sets GIT_CONFIG_LOCAL to override the configuration file.

Will only override an existing GIT_CONFIG_LOCAL if explicitly set.

Defaults to ~/github-import

use_config_file

Defaults to false.

The github-import command line tool sets this attribute to enable getting configuration data.

username

The username for github.com

If none is provided or in the config file uses $ENV{USER}.

token

The api token for github.com

remote

The name of the remote to create if add_remote is specified.

Defaults to github.

project

The directory to imoport.

Defaults to the current directory.

project_name

The project name to use when creating on github.

Defaults to the basename of project.

create

If true a repository will be created on github.

Defaults to true. Requires username and token.

add_remote

If true a remote will be added for the github repository.

Defaults to true.

push

If true the repository will be pushed to github.

Defaults to true.

tags

If true --tags will be given to git push.

Defaults to true.

refspec

The refspec to push, given to git push.

Defaults to master.

If you want to push all your branches set to refs/heads/*:refs/heads/*.

push_mode

One of all or mirror.

If specified, git push --all or git push --mirror is run instead of pushing with a refspec.

Overrides refspec and tags.

push_uri

Defaults to the SSH push URI for your github repository.

METHODS

new_with_options

MooseX::Getopt

run

Import the repository by running all steps

do_create

Create the repository by submitting a form.

do_add_remote

Add a remote entry for github to .git/config.

do_push

Run git push.

VERSION CONTROL

http://github.com/jrockway/github-import

AUTHORS

Jonathan Rockway

Yuval Kogman

LICENSE

MIT

COPYRIGHT

    Copyright 2009 Jonathan Rockway, Yuval Kogman, ALl rights reserved