Skip to content

Commit

Permalink
add doc for git-pull-request and others
Browse files Browse the repository at this point in the history
  • Loading branch information
spacewander committed Jul 29, 2016
1 parent a062420 commit 6656043
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 5 deletions.
32 changes: 29 additions & 3 deletions Commands.md
Expand Up @@ -36,20 +36,19 @@
- [`git obliterate`](#git-obliterate)
- [`git pr`](#git-pr)
- [`git psykorebase`](#git-psykorebase)
- [`git pull-request`](#git-pull-request)
- [`git rebase-patch`](#git-rebase-patch)
- [`git release`](#git-release)
- [`git rename-tag`](#git-rename-tag)
- [`git repl`](#git-repl)
- [`git reset-file`](#git-reset-file)
- [`git root`](#git-root)
- [`git scp`](#git-scp)
- [`git sed`](#git-sed)
- [`git setup`](#git-setup)
<<<<<<< HEAD
=======
- [`git show-merged-branches`](#git-show-merged-branches)
- [`git show-unmerged-branches`](#git-show-unmerged-branches)
- [`git show-tree`](#git-show-tree)
>>>>>>> 7c693c3... add git-show-(un)merged-branches to Commands.md
- [`git standup`](#git-standup)
- [`git squash`](#git-squash)
- [`git summary`](#git-summary)
Expand Down Expand Up @@ -348,6 +347,29 @@ Does the following:
- Push the branch / tags
- Executes _.git/hooks/post-release.sh_ (if present)

## git rename-tag

Rename a tag (locally and remotely).
```
$ git tag test
$ git push --tags
Total 0 (delta 0), reused 0 (delta 0)
To git@myserver.com:myuser/myrepository.git
* [new tag] test -> test
$ git tag
test
$ git rename-tag test test2
Deleted tag 'test' (was 1111111)
Total 0 (delta 0), reused 0 (delta 0)
To git@myserver.com:myuser/myrepository.git
* [new tag] test2 -> test2
remote: warning: Deleting a non-existent ref.
To git@myserver.com:myuser/myrepository.git
- [deleted] refs/tag/test
$ git tag
test2
```

## git alias

Define, search and show aliases.
Expand Down Expand Up @@ -1050,6 +1072,10 @@ $ git psykorebase master feature
The above rebase `feature` branch on top of `master` branch
## git pull-request
Create pull request via commandline.
## git rebase-patch
Given you have a patch that doesn´t apply to the current HEAD, but you know it applied to some commit in the past,
Expand Down
2 changes: 1 addition & 1 deletion bin/git-fork
Expand Up @@ -20,7 +20,7 @@ read user
# extract owner + project from repo url
project=${url##*/}
owner=${url%/$project}
[[ $project == *.git ]] && project=${project%.git}
project=${project%.git}
if [[ $owner == git@* ]]; then
owner=${owner##*:}
else
Expand Down
8 changes: 7 additions & 1 deletion bin/git-pull-request
Expand Up @@ -39,7 +39,13 @@ git push origin $branch || abort "failed to push $branch"

# lame hack to get project

project=$(git config remote.origin.url | sed 's/^.*://' | sed 's/\.git$//')
origin=$(git config remote.origin.url)
if [[ $origin == git@* ]]; then
project=${origin##*:}
else
project=${origin#https://*/}
fi
project=${project%.git}

# prompt

Expand Down
1 change: 1 addition & 0 deletions etc/git-extras-completion.zsh
Expand Up @@ -389,6 +389,7 @@ zstyle ':completion:*:*:git:*' user-commands \
obliterate:'rewrite past commits to remove some files' \
pr:'checks out a pull request locally' \
psykorebase:'rebase a branch with a merge commit' \
pull-request:'create pull request to GitHub project' \
rebase-patch:'rebases a patch' \
refactor:'create refactor branch' \
release:'commit, tag and push changes to the repository' \
Expand Down
46 changes: 46 additions & 0 deletions man/git-pull-request.1
@@ -0,0 +1,46 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-PULL\-REQUEST" "1" "July 2016" "" ""
.
.SH "NAME"
\fBgit\-pull\-request\fR \- Create pull request for GitHub project
.
.SH "SYNOPSIS"
\fBgit\-pull\-request\fR [<target branch>]
.
.SH "DESCRIPTION"
Create pull request for a project on GitHub via commandline\.
.
.SH "OPTIONS"
<target branch>
.
.P
The target branch you want to send pull request to\.
.
.SH "EXAMPLES"
.
.nf

$ git pull\-request master
Everything up\-to\-date

create pull\-request for spacewander/spacewander\-toolbox \'master\'

title: test
body:
base [master]:

Enter host password for user \'spacewanderlzx@gmail\.com\':
\.\.\.
.
.fi
.
.SH "AUTHOR"
Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/tj/git\-extras\fR>
127 changes: 127 additions & 0 deletions man/git-pull-request.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions man/git-pull-request.md
@@ -0,0 +1,44 @@
git-pull-request(1) -- Create pull request for GitHub project
================================

## SYNOPSIS

`git-pull-request` [&lt;target branch&gt;]

## DESCRIPTION

Create pull request for a project on GitHub via commandline.

## OPTIONS

&lt;target branch&gt;

The target branch you want to send pull request to.

## EXAMPLES

```
$ git pull-request master
Everything up-to-date
create pull-request for spacewander/spacewander-toolbox 'master'
title: test
body:
base [master]:
Enter host password for user 'spacewanderlzx@gmail.com':
...
```

## AUTHOR

Written by Tj Holowaychuk &lt;<tj@vision-media.ca>&gt;

## REPORTING BUGS

&lt;<https://github.com/tj/git-extras/issues>&gt;

## SEE ALSO

&lt;<https://github.com/tj/git-extras>&gt;

0 comments on commit 6656043

Please sign in to comment.