added git-locked to check what files have been locked

This commit is contained in:
Kevin Woo 2014-10-16 20:41:16 -05:00
parent 55c8ad0141
commit 6d7f10c0c6
8 changed files with 386 additions and 0 deletions

View file

@ -69,6 +69,7 @@ $ brew install git-extras
- `git archive-file`
- `git missing`
- `git lock`
- `git locked`
- `git unlock`
- `git reset-file`
- `git pr`
@ -650,10 +651,23 @@ Lock a local file `filename`:
$ git lock config/database.yml
```
## git-locked
List local locked files:
```bash
$ git locked
config/database.yml
```
## git-unlock filename
Unlock a local file `filename`
```bash
$ git unlock config/database.yml
```
## git-reset-file filename [commit]
Reset one file to `HEAD` or certain commit

3
bin/git-locked Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
git ls-files -v | grep ^S | sed -e 's|S ||'

136
man/git-fork.html Normal file
View file

@ -0,0 +1,136 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
<title>git-fork(1) - Fork a repo on github</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
.mp h2 {margin:10px 0 0 0}
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
.mp h3 {margin:0 0 0 4ex}
.mp dt {margin:0;clear:left}
.mp dt.flush {float:left;width:8ex}
.mp dd {margin:0 0 0 9ex}
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
.mp pre {margin-bottom:20px}
.mp pre+h2,.mp pre+h3 {margin-top:22px}
.mp h2+pre,.mp h3+pre {margin-top:5px}
.mp img {display:block;margin:auto}
.mp h1.man-title {display:none}
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
.mp h2 {font-size:16px;line-height:1.25}
.mp h1 {font-size:20px;line-height:2}
.mp {text-align:justify;background:#fff}
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
.mp u {text-decoration:underline}
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
.mp b.man-ref {font-weight:normal;color:#434241}
.mp pre {padding:0 4ex}
.mp pre code {font-weight:normal;color:#434241}
.mp h2+pre,h3+pre {padding-left:0}
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
ol.man-decor {width:100%}
ol.man-decor li.tl {text-align:left}
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
ol.man-decor li.tr {text-align:right;float:right}
</style>
</head>
<!--
The following styles are deprecated and will be removed at some point:
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
.man-navigation should be used instead.
-->
<body id='manpage'>
<div class='mp' id='man'>
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#DESCRIPTION">DESCRIPTION</a>
<a href="#EXAMPLE">EXAMPLE</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#REPORTING-BUGS">REPORTING BUGS</a>
<a href="#SEE-ALSO">SEE ALSO</a>
</div>
<ol class='man-decor man-head man head'>
<li class='tl'>git-fork(1)</li>
<li class='tc'></li>
<li class='tr'>git-fork(1)</li>
</ol>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>git-fork</code> - <span class="man-whatis">Fork a repo on github</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>git-fork</code> [&lt;github-repo-url&gt;]</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p> Fork the given github repo. Like clone but forks first.</p>
<ol>
<li> forks the repo on github</li>
<li> clones the repo into the current dir</li>
<li> adds the original repo as a remote</li>
</ol>
<h2 id="EXAMPLE">EXAMPLE</h2>
<p> Fork expect.js:</p>
<pre><code>$ git fork https://github.com/LearnBoost/expect.js
</code></pre>
<p> or just:</p>
<pre><code>$ git fork LearnBoost/expect.js
</code></pre>
<p> Then:</p>
<pre><code>$ ..&lt;forks into your github profile and clones repo locally to expect.js dir&gt;...
$ cd expect.js &amp;&amp; git remote -v
origin git@github.com:&lt;user>/expect.js (fetch)
origin git@github.com:&lt;user>/expect.js (push)
original git@github.com:LearnBoost/expect.js (fetch)
original git@github.com:LearnBoost/expect.js (push)
</code></pre>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Andrew Griffiths &lt;<a href="&#x6d;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#x6d;&#x61;&#105;&#108;&#64;&#x61;&#110;&#100;&#x72;&#x65;&#x77;&#103;&#114;&#105;&#102;&#102;&#x69;&#x74;&#x68;&#115;&#111;&#x6e;&#108;&#105;&#110;&#x65;&#x2e;&#99;&#x6f;&#x6d;" data-bare-link="true">&#x6d;&#x61;&#105;&#x6c;&#x40;&#x61;&#110;&#x64;&#x72;&#101;&#119;&#x67;&#114;&#x69;&#x66;&#102;&#x69;&#116;&#x68;&#115;&#111;&#x6e;&#108;&#x69;&#110;&#101;&#46;&#x63;&#111;&#109;</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
<p>&lt;<a href="https://github.com/visionmedia/git-extras/issues" data-bare-link="true">https://github.com/visionmedia/git-extras/issues</a>&gt;</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p>&lt;<a href="https://github.com/visionmedia/git-extras" data-bare-link="true">https://github.com/visionmedia/git-extras</a>&gt;</p>
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>October 2014</li>
<li class='tr'>git-fork(1)</li>
</ol>
</div>
</body>
</html>

32
man/git-locked.1 Normal file
View file

@ -0,0 +1,32 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-LOCKED" "1" "October 2014" "" ""
.
.SH "NAME"
\fBgit\-locked\fR \- ls files that have been locked
.
.SH "SYNOPSIS"
\fBgit\-locked\fR
.
.SH "DESCRIPTION"
List local files that have been locked
.
.SH "EXAMPLES"
.
.nf
$ git lock config/database\.yml
$ git locked
config/database\.yml
.
.fi
.
.SH "AUTHOR"
Written by Kevin Woo <\fIkevinawoo@gmail\.com\fR>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/visionmedia/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/visionmedia/git\-extras\fR>

112
man/git-locked.html Normal file
View file

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
<title>git-locked(1) - ls files that have been locked</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
.mp h2 {margin:10px 0 0 0}
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
.mp h3 {margin:0 0 0 4ex}
.mp dt {margin:0;clear:left}
.mp dt.flush {float:left;width:8ex}
.mp dd {margin:0 0 0 9ex}
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
.mp pre {margin-bottom:20px}
.mp pre+h2,.mp pre+h3 {margin-top:22px}
.mp h2+pre,.mp h3+pre {margin-top:5px}
.mp img {display:block;margin:auto}
.mp h1.man-title {display:none}
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
.mp h2 {font-size:16px;line-height:1.25}
.mp h1 {font-size:20px;line-height:2}
.mp {text-align:justify;background:#fff}
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
.mp u {text-decoration:underline}
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
.mp b.man-ref {font-weight:normal;color:#434241}
.mp pre {padding:0 4ex}
.mp pre code {font-weight:normal;color:#434241}
.mp h2+pre,h3+pre {padding-left:0}
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
ol.man-decor {width:100%}
ol.man-decor li.tl {text-align:left}
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
ol.man-decor li.tr {text-align:right;float:right}
</style>
</head>
<!--
The following styles are deprecated and will be removed at some point:
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
.man-navigation should be used instead.
-->
<body id='manpage'>
<div class='mp' id='man'>
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#DESCRIPTION">DESCRIPTION</a>
<a href="#EXAMPLES">EXAMPLES</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#REPORTING-BUGS">REPORTING BUGS</a>
<a href="#SEE-ALSO">SEE ALSO</a>
</div>
<ol class='man-decor man-head man head'>
<li class='tl'>git-locked(1)</li>
<li class='tc'></li>
<li class='tr'>git-locked(1)</li>
</ol>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>git-locked</code> - <span class="man-whatis">ls files that have been locked</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>git-locked</code></p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p> List local files that have been locked</p>
<h2 id="EXAMPLES">EXAMPLES</h2>
<pre><code>$ git lock config/database.yml
$ git locked
config/database.yml
</code></pre>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Kevin Woo &lt;<a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#x6f;&#58;&#107;&#x65;&#118;&#x69;&#x6e;&#x61;&#119;&#111;&#x6f;&#x40;&#x67;&#109;&#97;&#x69;&#108;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x6b;&#x65;&#118;&#105;&#110;&#x61;&#x77;&#111;&#111;&#64;&#x67;&#109;&#97;&#105;&#108;&#x2e;&#x63;&#x6f;&#x6d;</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
<p>&lt;<a href="https://github.com/visionmedia/git-extras/issues" data-bare-link="true">https://github.com/visionmedia/git-extras/issues</a>&gt;</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p>&lt;<a href="https://github.com/visionmedia/git-extras" data-bare-link="true">https://github.com/visionmedia/git-extras</a>&gt;</p>
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>October 2014</li>
<li class='tr'>git-locked(1)</li>
</ol>
</div>
</body>
</html>

28
man/git-locked.md Normal file
View file

@ -0,0 +1,28 @@
git-locked(1) -- ls files that have been locked
========================================================
## SYNOPSIS
`git-locked`
## DESCRIPTION
List local files that have been locked
## EXAMPLES
$ git lock config/database.yml
$ git locked
config/database.yml
## AUTHOR
Written by Kevin Woo &lt;<kevinawoo@gmail.com>&gt;
## REPORTING BUGS
&lt;<https://github.com/visionmedia/git-extras/issues>&gt;
## SEE ALSO
&lt;<https://github.com/visionmedia/git-extras>&gt;

60
man/git-rebase-patch Normal file
View file

@ -0,0 +1,60 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-REBASE\-PATCH" "" "October 2014" "" ""
.
.SH "SYNOPSIS"
\fBgit\-rebase\-patch\fR <patch\-file>
.
.SH "DESCRIPTION"
Given you have a patch that doesn\'t apply to the current HEAD, but you know it applied to some commit in the past, \fBgit\-rebase\-patch\fR will help you find that commit and do a rebase\.
.
.SH "OPTIONS"
.
.TP
<patch\-file>
The patch to be applied\.
.
.SH "EXAMPLES"
Executing
.
.IP "" 4
.
.nf
$ git rebase\-patch test\.patch
.
.fi
.
.IP "" 0
.
.P
could give you something like that:
.
.IP "" 4
.
.nf
Trying to find a commit the patch applies to\.\.\.
Patch applied to dbcf408dd26 as 7dc8b23ae1a
First, rewinding head to replay your work on top of it\.\.\.
Applying: test\.patch
Using index info to reconstruct a base tree\.\.\.
Falling back to patching base and 3\-way merge\.\.\.
Auto\-merging README\.txt
.
.fi
.
.IP "" 0
.
.P
Then your last commit has the changes of the patch and is named \fItest\.patch\fR\.
.
.SH "AUTHOR"
Written by Niklas Fiekas <\fIniklas\.fiekas@tu\-clausthal\.de\fR>
.
.SH "REPORTING BUGS"
<\fIhttp://github\.com/visionmedia/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttp://github\.com/visionmedia/git\-extras\fR>

View file

@ -23,6 +23,7 @@ git-ignore(1) git-ignore
git-info(1) git-info
git-local-commits(1) git-local-commits
git-lock(1) git-lock
git-locked(1) git-locked
git-missing(1) git-missing
git-pr(1) git-pr
git-rebase-patch(1) git-rebase-patch