| Github-Import documentation | view source | Contained in the Github-Import distribution. |
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.
All variables are taken from github-import except username and token
which also fall back to github.user and 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.
Will only override an existing GIT_CONFIG_LOCAL if explicitly set.
Defaults to ~/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}.
The api token for github.com
The name of the remote to create if add_remote is specified.
Defaults to 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.
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.
Defaults to true.
If true --tags will be given to git push.
Defaults to true.
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/*.
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.
Defaults to the SSH push URI for your github repository.
Import the repository by running all steps
Create the repository by submitting a form.
Add a remote entry for github to .git/config.
Run git push.
Jonathan Rockway
Yuval Kogman
MIT
Copyright 2009 Jonathan Rockway, Yuval Kogman, ALl rights reserved
| Github-Import documentation | view source | Contained in the Github-Import distribution. |