8000 GitHub - dardie/gh: Powershell script to navigate local github repositories
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dardie/gh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gh - Navigate local github repositories

(A simple powershell command 'gh' to manage local git repos, inspired by this article: https://medium.com/@dickeyxxx/the-best-code-ive-ever-written-afaf96f49535#.rb3saf7z4).

This is a simple powershell function to download github repos locally (stored in a logical local folder structure), and navigate easily through that folder structure.

Installation

At the top of the file change the line that assigns the variable $gitdir to the folder where you would like all of your local github repositories to be stored. Then import the module in your $profile.

To test import from a powershell console:

import-module -force .\gh.psm1

Usage

Use as per the following examples:

gh https://github.com/USER/REPO.git

or

gh USER REPO

If a local copy of the repo https://github.com/USER/REPO.git does not exist, download it to the folder $gitdir\USER\REPO. If a local copy does exist, cd to that local folder ($gitdir\USER\REPO).

gh ID

Search for any local repos with REPOID as the name of the user or repo. ie. $gitdir\USER\REPO where either USER=ID or REPO=ID. If a single repo matches ID, cd to that repo. Otherwise, list all matching repos.

gh

List all local repos.

About

Powershell script to navigate local github repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0