Add documentation.

This commit is contained in:
Rémy HUBSCHER 2020-03-19 16:10:20 +01:00
parent 629fc03581
commit 739ca052b4
No known key found for this signature in database
GPG key ID: A500E24B95405094
5 changed files with 181 additions and 0 deletions

View file

@ -15,6 +15,7 @@
- [`git commits-since`](#git-commits-since)
- [`git contrib`](#git-contrib)
- [`git count`](#git-count)
- [`git cp`](#git-cp)
- [`git create-branch`](#git-create-branch)
- [`git delete-branch`](#git-delete-branch)
- [`git delete-merged-branches`](#git-delete-merged-branches)
@ -786,6 +787,14 @@ If you wish to omit the config section, you may use `--no-config`:
$ git info --no-config
```
## git cp
Copy a file to another one keeping its history and allowing for merge conflits handling.
```bash
$ git cp README.md README.rst
```
## git create-branch
Create local branch `name`:

View file

@ -49,6 +49,10 @@ _git_count(){
__gitcomp "--all"
}
__git_cp(){
__git_complete_file
}
_git_delete_branch(){
__gitcomp "$(__git_heads)"
}

24
man/git-cp.1 Normal file
View file

@ -0,0 +1,24 @@
.\" generated with Ronn-NG/v0.8.0
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0
.TH "GIT\-CP" "1" "March 2020" "" ""
.SH "NAME"
\fBgit\-cp\fR \- Copy a file keeping its history
.SH "SYNOPSIS"
\fBgit\-cp\fR <current_filename> <destination_filename>
.SH "DESCRIPTION"
Copy a file keeping its git history\. This allow merge conflict handling\.
.SH "EXAMPLES"
Copy README into README\.txt
.IP "" 4
.nf
$ git cp README README\.txt
.fi
.IP "" 0
.SH "AUTHOR"
Written by Rémy Hubscher <\fI\%mailto:hubscher\.remy@gmail\.com\fR>
.SH "REPORTING BUGS"
<\fI\%https://github\.com/tj/git\-extras/issues\fR>
.SH "SEE ALSO"
<\fI\%https://github\.com/tj/git\-extras\fR>
.P
<\fI\%https://stackoverflow\.com/questions/16937359/git\-copy\-file\-preserving\-history/44036771#44036771\fR>

114
man/git-cp.html Normal file
View file

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' content='text/html;charset=utf8'>
<meta name='generator' content='Ronn-NG/v0.8.0 (http://github.com/apjanke/ronn-ng/tree/0.8.0)'>
<title>git-cp(1) - Copy a file keeping its history</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-cp(1)</li>
<li class='tc'></li>
<li class='tr'>git-cp(1)</li>
</ol>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>git-cp</code> - <span class="man-whatis">Copy a file keeping its history</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>git-cp</code> &lt;current_filename&gt; &lt;destination_filename&gt;</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>Copy a file keeping its git history. This allow merge conflict handling.</p>
<h2 id="EXAMPLES">EXAMPLES</h2>
<p> Copy README into README.txt</p>
<pre><code>$ git cp README README.txt
</code></pre>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Rémy Hubscher &lt;<a href="mailto:hubscher.remy@gmail.com" data-bare-link="true">hubscher.remy@gmail.com</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
<p>&lt;<a href="https://github.com/tj/git-extras/issues" data-bare-link="true">https://github.com/tj/git-extras/issues</a>&gt;</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p>&lt;<a href="https://github.com/tj/git-extras" data-bare-link="true">https://github.com/tj/git-extras</a>&gt;</p>
<p>&lt;<a href="https://stackoverflow.com/questions/16937359/git-copy-file-preserving-history/44036771#44036771" data-bare-link="true">https://stackoverflow.com/questions/16937359/git-copy-file-preserving-history/44036771#44036771</a>&gt;</p>
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>March 2020</li>
<li class='tr'>git-cp(1)</li>
</ol>
</div>
</body>
</html>

30
man/git-cp.md Normal file
View file

@ -0,0 +1,30 @@
git-cp(1) -- Copy a file keeping its history
============================================
## SYNOPSIS
`git-cp` &lt;current_filename&gt; &lt;destination_filename&gt;
## DESCRIPTION
Copy a file keeping its git history. This allow merge conflict handling.
## EXAMPLES
Copy README into README.txt
$ git cp README README.txt
## AUTHOR
Written by Rémy Hubscher &lt;<hubscher.remy@gmail.com>&gt;
## REPORTING BUGS
&lt;<https://github.com/tj/git-extras/issues>&gt;
## SEE ALSO
&lt;<https://github.com/tj/git-extras>&gt;
&lt;<https://stackoverflow.com/questions/16937359/git-copy-file-preserving-history/44036771#44036771>&gt;