Github::Import - Import your project into http://github.com
# 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
This class/script provides a way to import a git repository into http://github.com.
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.
--no-push
--push
All variables are taken from github-import except username and token which also fall back to github.user and github.token.
github-import
username
token
github.user
github.token
If true nothing will actually be done, but the output will be printed.
This is a YAML file containing values for attributes.
Sets GIT_CONFIG_LOCAL to override the configuration file.
GIT_CONFIG_LOCAL
Will only override an existing GIT_CONFIG_LOCAL if explicitly set.
Defaults to ~/github-import
~/github-import
Defaults to false.
The github-import command line tool sets this attribute to enable getting configuration data.
The username for github.com
If none is provided or in the config file uses $ENV{USER}.
$ENV{USER}
The api token for github.com
The name of the remote to create if add_remote is specified.
add_remote
Defaults to github.
github
The directory to imoport.
Defaults to the current directory.
The project name to use when creating on github.
Defaults to the basename of project.
project
If true a repository will be created on github.
Defaults to true. Requires username and token.
If true a remote will be added for the github repository.
Defaults to true.
If true the repository will be pushed to github.
If true --tags will be given to git push.
--tags
git push
The refspec to push, given to git push.
Defaults to master.
master
If you want to push all your branches set to refs/heads/*:refs/heads/*.
refs/heads/*:refs/heads/*
One of all or mirror.
all
mirror
If specified, git push --all or git push --mirror is run instead of pushing with a refspec.
git push --all
git push --mirror
Overrides refspec and tags.
refspec
tags
Defaults to the SSH push URI for your github repository.
MooseX::Getopt
Import the repository by running all steps
Create the repository by submitting a form.
Add a remote entry for github to .git/config.
.git/config
Run git push.
http://github.com/jrockway/github-import
Jonathan Rockway
Yuval Kogman
MIT
Copyright 2009 Jonathan Rockway, Yuval Kogman, ALl rights reserved
To install Github::Import, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Github::Import
CPAN shell
perl -MCPAN -e shell install Github::Import
For more information on module installation, please visit the detailed CPAN module installation guide.