{"id":16099943,"url":"https://github.com/fooock/windows-git-prompt","last_synced_at":"2025-09-01T03:39:05.556Z","repository":{"id":128383153,"uuid":"129166346","full_name":"fooock/windows-git-prompt","owner":"fooock","description":"Show git branch in the Windows prompt in under 10 lines!","archived":false,"fork":false,"pushed_at":"2018-04-14T22:43:44.000Z","size":1576,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T14:17:43.148Z","etag":null,"topics":["prompt","windows","windows-10","windows10"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fooock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-11T23:35:05.000Z","updated_at":"2025-04-30T07:15:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"51bd418e-8fae-4e66-a08d-412442584f0a","html_url":"https://github.com/fooock/windows-git-prompt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fooock/windows-git-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fwindows-git-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fwindows-git-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fwindows-git-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fwindows-git-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fooock","download_url":"https://codeload.github.com/fooock/windows-git-prompt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fwindows-git-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273070122,"owners_count":25040220,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["prompt","windows","windows-10","windows10"],"created_at":"2024-10-09T18:44:36.174Z","updated_at":"2025-09-01T03:39:05.532Z","avatar_url":"https://github.com/fooock.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Windows git prompt\nSimple and useful script to show in the Windows 10 prompt the git branch\nif you are on a `git` project.\n\u003e I'm using ConEmu as terminal\n\n![](demo.gif)\n\nAnother demo changing the git branch\n\n![](demo1.gif)\n\n## How I can install it?\nClone this repo\n```bash\n$ git clone https://github.com/fooock/windows-git-prompt.git\n```\n\nNow you need to run `regedit` to add a key. First go to\n`HKEY_CURRENT_USER\\Software\\Microsoft\\Command Processor` and add a \nentry with name `AutoRun`. Add the **full path** to the [envkey.cmd file](envkey.cmd) to the value.\n\nIf you are inside a git project you will be able to see the branch name \nin the prompt.\n\n## How it works?\nI created [this file](winrc.cmd) to modify the Windows prompt to show the branch name of the current git\nproject (if any). Then I created two `DOSKEY`, called `cd` and `git`:\n```bash\nDOSKEY cd=cd $* ^\u0026^\u0026 %~dp0\\winrc.cmd\nDOSKEY git=git $* ^\u0026^\u0026 %~dp0\\winrc.cmd\n```\n\u003e **Note** This line is the actuall content of [envkey.cmd](envkey.cmd) file\n\n### References\n* https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt\n* https://stackoverflow.com/questions/12028372/how-to-change-command-line-prompt-in-windows\n* http://www.hanselman.com/blog/ABetterPROMPTForCMDEXEOrCoolPromptEnvironmentVariablesAndANiceTransparentMultiprompt.aspx\n* http://ascii-table.com/ansi-escape-sequences.php\n\n## License\n```\nThe MIT License (MIT)\n\nCopyright (c) 2018 Javi \u003cnhitbh at gmail dot com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooock%2Fwindows-git-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffooock%2Fwindows-git-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooock%2Fwindows-git-prompt/lists"}