-
Notifications
You must be signed in to change notification settings - Fork 15
Command Proposals
Joel Bennett edited this page Apr 26, 2015
·
3 revisions
The goal here is NOT to produce a cmdlet for each git command, but rather to map conceptual tasks to PowerShell commands, with the intention of getting a reasonable interface to git which speaks objects!
The important nouns are: Repository (repo, rp), Branch (b), GItem (gi), Remote (rm), Stash (st), Tag (tg) ...
Note that the second set of Branch commands could use other nouns (like "Commit" or "Repo" or just "Git"), but I'm sticking with Branch just for consistency's sake.
Git Command | PowerShell Command | Task | Alias Ideas |
---|---|---|---|
log | Get-Log | Show commit logs | log |
status | Get-Status | Show the working tree status | status |
init | New-Repository | Create an empty Git repository or reinitialize an existing one | nrp |
clone | Copy-Repository | Clone a repository into a new directory | cprp |
branch | New-Branch | Create a branch | nb |
branch -a | Get-Branch | List branches | gb |
branch -r | Remove-Branch | Delete branch | rb |
checkout | Set-Branch | Checkout (and optionally create) a branch | sb |
add | Add-GItem | Add file contents to the index | agi |
rm | Remove-GItem | Remove files from the working tree and from the index | rmgi |
mv | Move-GItem | Move or rename a file, a directory, or a symlink | mvgi |
reset | Reset-GItem | Reset specified paths in the current HEAD | rsgi |
reset | Reset-Branch | Reset the branch/index to the specified commit | rsgi |
diff | Compare-Branch | Show changes between commits, commit and working tree, etc | gdiff |
difftool | Compare-Branch? | Show changes using graphical diff tools | difftool |
merge | Merge-Branch | Join two or more development histories together | mb |
commit | Save-Branch, Checkpoint-Branch? | Record changes from the indext to the repository in a new commit | |
push | Send-Branch, Push-Branch? | Update remote with associated objects | |
pull | Receive-Branch, Update-Branch? | Fetch from and integrate with another repository or a local branch | |
fetch | Sync-Remote | Download objects and refs from another repository | syrm |
archive | Compress-Branch | Create an archive of files from a named tree | cb |
filter-branch | Repair-Branch | Rewrite branches | rpb |
config | Get-Configuration | Get repository or global options | gcfg |
config | Set-Configuration | Set repository or global options | scfg |
stash | Push-Stash | Stash the changes (in a dirty working directory away) | pushg |
stash apply | Pop-Stash | UNStash the changes (in a dirty working directory away) | popg |
tag | New-Tag | Create a tag object signed with GPG | ntg |
tag | Get-Tag | List tag objects | gtg |
tag | Remove-Tag | Delete tag objects | rtg |
tag | Test-Tag | Validate tag objects | vtg |
remote add | Add-Remote | Add a new remote repository | nrm |
remote remove | Remove-Remote | Remove remote repositories | grm |
remote | Get-Remote | List remote repositories | grm |
cherry-pick | Import-Commit | Apply the changes introduced by some existing commits | ipcm |
blame | Get-Blame | Show what revision and author last modified each line of a file | |
rebase | Set-Branch, Move-Branch? | Forward-port local commits to the updated upstream head | |
submodule add | Add-Submodule | Add the given repository as a submodule at the given path | asm |
submodule update | Update-Submodule | Update the registered submodules | usm |
submodule status | Test-Submodule | Show the status of the submodules | tsm |
submodule deinit | Remove-Submodule | Unregister the given submodules | rsm |
These commands (and their options) need to be mapped properly to TASKS
submodule
format-patch
bisect
gc - Clear-Repo
show *
shortlog *
describe *
reflog
am
apply
send-email
request-pull
svn
fast-import
clean
fsck
instaweb
archive
daemon
update-server-info