Add list command

This commit is contained in:
zxcxz7 2016-05-26 17:37:51 +09:00
parent 67f84e141c
commit 312b4a6c99
No known key found for this signature in database
GPG Key ID: 033E841CB448FB47
2 changed files with 9 additions and 0 deletions

View File

@ -102,6 +102,7 @@
* [Extract file from another branch.](https://github.com/git-tips/tips#extract-file-from-another-branch)
* [List only the root and merge commits.](https://github.com/git-tips/tips#list-only-the-root-and-merge-commits)
* [Merge previous two commits into one.](https://github.com/git-tips/tips#merge-previous-two-commits-into-one)
* [List of git repositories in multiple directories.](https://github.com/git-tips/tips#list-of-git-repositories-in-multiple-directories)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -695,5 +696,10 @@ git log --first-parent
git rebase --interactive HEAD~2
```
## List of git repositories in multiple directories.
```sh
find /path1 /path2 /path3 -regex '.*\.git' -type d -print0 | xargs -0 -I {} dirname {}
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -311,4 +311,7 @@
}, {
"title": "Merge previous two commits into one.",
"tip": "git rebase --interactive HEAD~2"
}, {
"title": "List of git repositories in multiple directories.",
"tip": "find /path1 /path2 /path3 -regex '.*\\.git' -type d -print0 | xargs -0 -I {} dirname {}"
}]