...
git-publish
publishes a local branch to a remote repository. git-publish
can also optionally act on the information returned by a remote forge when a new branch has been published, for example opening a link returned from a remote forge in the user's web browser.
Usage
Code Block |
---|
|
$ git publish -h
usage: git-publish [options] [<ORIGIN>]
-q, --quiet Silence all output
--followbrowse Open link providedreturned by remote in a web browser
--verbose Turn on verbose output
--debug Turn on debugging output
--version Print the version of this tool
-h, --help Show this help text |
Examples
Publish the currently active local branch (named "bugfix") to the remote named origin
:
Code Block |
---|
|
$ git publish
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 12 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (11/11), 772 bytes | 772.00 KiB/s, done.
Total 11 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
remote:
remote: Create a pull request for 'bugfix' on GitHub by visiting:
remote: https://github.com/edvbld/jdk/pull/new/bugfix
remote:
To git@github.com:edvbld/skara.git
* [new branch] bugfix -> bugfix
Branch 'bugfix' set up to track remote branch 'bugfix' from 'origin'. |
Publish the currently active local branch (named "bugfix") to the remote named origin and silence all output:
Publish currently active local branch (named "bugfix") to the remote named origin and open any link returned in a web browser:
Code Block |
---|
|
$ git publish --browse
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 12 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (11/11), 772 bytes | 772.00 KiB/s, done.
Total 11 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
remote:
remote: Create a pull request for 'bugfix' on GitHub by visiting:
remote: https://github.com/edvbld/jdk/pull/new/bugfix
remote:
To git@github.com:edvbld/skara.git
* [new branch] bugfix -> bugfix
Branch 'bugfix' set up to track remote branch 'bugfix' from 'origin'. |
(the link https://github.com/edvbld/jdk/pull/new/bugfix is now opened in the user's web browser)
Configuration
Configure the web browser that should be used to open links returned by a remote forge ("firefox" in this example):
Code Block |
---|
|
$ git configure --global publish.browser firefox |