{"id":21877055,"url":"https://github.com/capdiem/psgitutils","last_synced_at":"2025-04-15T02:43:17.270Z","repository":{"id":40729724,"uuid":"265472758","full_name":"capdiem/PSGitUtils","owner":"capdiem","description":"Provides emoji supports for Git commit and Git log. Provides some easier commands that encapsulating git commands.","archived":false,"fork":false,"pushed_at":"2023-06-28T09:44:00.000Z","size":882,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T14:37:17.887Z","etag":null,"topics":["emoji","git","gitcommit","powershell"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/PSGitUtils","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capdiem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-20T06:33:32.000Z","updated_at":"2024-10-23T23:37:24.000Z","dependencies_parsed_at":"2023-02-15T15:01:48.449Z","dependency_job_id":null,"html_url":"https://github.com/capdiem/PSGitUtils","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capdiem%2FPSGitUtils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capdiem%2FPSGitUtils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capdiem%2FPSGitUtils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capdiem%2FPSGitUtils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capdiem","download_url":"https://codeload.github.com/capdiem/PSGitUtils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997080,"owners_count":21195786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","git","gitcommit","powershell"],"created_at":"2024-11-28T08:07:57.395Z","updated_at":"2025-04-15T02:43:17.252Z","avatar_url":"https://github.com/capdiem.png","language":"PowerShell","readme":"# PSGitUtils [![PUBLISH](https://github.com/capdiem/PSGitUtils/actions/workflows/publish.yml/badge.svg?branch=v1.10.2)](https://github.com/capdiem/PSGitUtils/actions/workflows/publish.yml)\n\n- Provides emoji supports for Git commit and Git log.\n- Provides some easier commands that encapsulating git commands.\n\n## Install\n\n```powershell\n\u003e Install-Module -Name PSGitUtils\n```\n\n# Usage\n\n- Invoke-GitCommit\n\n  Same as `git commit -m`, but provides choices of types. It would generate the message like `\u003ctype\u003e(\u003cscope\u003e): \u003cemoji\u003e subject`. You can modify `$GitUtilsConfig` to decide whether or not generating emoji and type.\n\n  ```powershell\n  \u003e Invoke-GitCommit \"New Commit\"\n  \u003e ggc \"New Commit\"\n  ```\n\n- Invoke-GitHistory\n\n  Same as `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)\u003c%an\u003e%Creset'`, but replaces [Gitmoji code](https://gitmoji.carloscuesta.me/) with emoji.\n\n  ```powershell\n  \u003e Invoke-GitHistory\n  \u003e Invoke-GitHistory 20\n  \u003e ggh\n  \u003e ggh 20\n  ```\n\n- GitUtilsConfig\n\n  ```powershell\n  \u003e $GitUtilsConfig.Type = $True  # determine whether to show the \u003ctype\u003e, default show\n  \u003e $GitUtilsConfig.Scope = $True # determine whether to show the \u003cscope\u003e, default show\n  \u003e $GitUtilsConfig.Emoji = $True # determine whether to show the \u003cemoji\u003e, default show\n  \u003e $GitUtilsConfig.EmojiFirst = $False # determine whether to place the \u003cemoji\u003e in front of \u003ctype\u003e, default no\n  ```\n\n- Other Aliases\n\n  ```powershell\n  \u003e gga   # git add [.|args]\n  \u003e ggb   # git branch [-av|args]\n  \u003e ggbd  # git branch -d [args] with user interactions\n  \u003e ggbs  # Try to delete the local branches that no longer exist on the remote\n  \u003e ggck  # git checkout [args], user interactions if args is empty\n  \u003e ggckb # git checkout -b \u003cbranch-name\u003e\n  \u003e ggc   # git commit -m \u003cmsg\u003e with user interactions\n  \u003e ggd   # git diff [args]\n  \u003e ggpl  # git pull [args]\n  \u003e ggps  # git push [args]\n  \u003e ggrst # git reset [args]\n  \u003e ggs   # git status [args]\n  ```\n\n## Best Practices\n\n```powershell\n# open default profile\n\u003e notepad $PROFILE\n# copy the following code and paste it into $PROFILE\nif (Get-Module PSGitUtils -ListAvailable) {\n  Import-Module PSGitUtils         # initialize variables\n  $GitUtilsConfig.Emoji = $false   # do not pick and insert \u003cemoji\u003e\n\n  Set-Alias ga gga\n  Set-Alias gb ggb\n  Set-Alias gbd ggbd\n  Set-Alias gbs ggbs\n  Set-Alias gck ggck\n  Set-Alias gckb ggckb\n  Remove-Item 'Alias:\\gcm' -Force\n  Set-Alias gcm ggc\n  Set-Alias gcmd Get-Command\n  Set-Alias gd ggd\n  Set-Alias gh ggl\n  Set-Alias gpl ggpl\n  Remove-Item 'Alias:\\gps' -Force\n  Set-Alias gps ggps\n  Set-Alias grst ggrst\n  Set-Alias gs ggs\n}\n\n# use (some examples...)\n\u003e gs # git status\n\u003e gh # git log\n\u003e gcm \"test\" # git commit -m \"test\"\n```\n\n![Example of Invoke-GitCommit](assets/Invoke-GitCommit.gif)\n\n## References\n\n- [Gitmoji](https://gitmoji.carloscuesta.me/)\n- [Semantic Commit Messages](https://seesparkbox.com/foundry/semantic_commit_messages)\n- [git commit emoji 使用指南](https://github.com/liuchengxu/git-commit-emoji-cn)\n- [emoji.dic](https://gist.github.com/Polkm/fe2e4fb940e4e1569684feb503433e3e)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapdiem%2Fpsgitutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapdiem%2Fpsgitutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapdiem%2Fpsgitutils/lists"}