{"id":16793113,"url":"https://github.com/maxwroc/git-prompt","last_synced_at":"2026-02-06T17:02:28.908Z","repository":{"id":72465349,"uuid":"136835757","full_name":"maxwroc/git-prompt","owner":"maxwroc","description":"Dynamic command line prompt for GIT","archived":false,"fork":false,"pushed_at":"2021-11-12T12:28:46.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T22:03:18.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxwroc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-10T18:47:31.000Z","updated_at":"2021-11-12T12:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"24ab32f1-1e30-4d34-a06c-20d057d8daa8","html_url":"https://github.com/maxwroc/git-prompt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxwroc/git-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwroc%2Fgit-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwroc%2Fgit-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwroc%2Fgit-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwroc%2Fgit-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxwroc","download_url":"https://codeload.github.com/maxwroc/git-prompt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwroc%2Fgit-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29169384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-13T08:48:14.736Z","updated_at":"2026-02-06T17:02:28.885Z","avatar_url":"https://github.com/maxwroc.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Prompt\nWindows command line prompt for Git.\n\n![Command prompt example](img/screenshot.png)\n\n\n1. [Problem](#problem)\n2. [Solution](#solution)\n3. [Installation](#installation)\n4. [Modules](#modules)\n    * [Dynamic prompt](#1-dynamic-prompt)\n    * [Git wrapper](#2-git-wrapper)\n\n---\n\n## Problem\nGoal is to have a GIT active branch name always in command prompt.\n\nThe problem is that it is not possible to use any variables when you set command line prompt e.g. the following command will set the time in the prompt but it won't be changing dynamically:\n\n```\nprompt %time% $P$G\n```\nResult:\n```\n9:40:07.23 D:\\Projects\u003e\n9:40:07.23 D:\\Projects\u003e\n9:40:07.23 D:\\Projects\u003eecho %time%\n 9:40:26.88\n\n9:40:07.23 D:\\Projects\u003e\n```\n\nWhen batch script line or command is executed it resolves all the variables first and executes the result. It means that the above command is equal to:\n```\nprompt 9:40:07.23 $P$G\n```\nTrying to escape % chars won't help here.\n\n## Solution\nScript which will be executing always on given command and setting the updated command prompt.\n\n## Installation\nTo initialize Git Prompt use the following command:\n```\ngit-wrapper.cmd /init\n```\nYou can create a shortcut to cmd.exe and add this command in Target field on \"Shortcut\" properties tab e.g.:\n```\ncmd.exe /k \"D:\\Projects\\git-wrapper.cmd /init\"\n```\n## Modules\n### 1. Dynamic prompt\n\nResponsible for setting prompt based on given template. This file can be reused for any other purposes where you want to have a dynamic command prompt.\n\nIt uses template.txt file where you can define your custom command prompt e.g.\n```\n%time% %my_dynamic_var% $P$G\n```\n\nTo initialize it you need to use /init switch with the command after which prompt should be updated. The following will be updating command prompt on every issued \"git\" command:\n```\ndynamic-prompt.cmd /init git\n```\nYou can specify custom script (as a second param) which will run instead of the command given as first param. The following will setup dynamic-prompt to run on every \"git\" command and will execute git-wrapper.cmd instead of original \"git\" command (all the other arguments following the second one will be passed to the git-wrapper script)\n```\ndynamic-prompt.cmd /init git D:\\Path\\git-wrapper.cmd\n```\n### 2. Git wrapper\nThis script is responsible for two things:\n\n1. Initialize the Git dynamic prompt\n2. Update global variable which stores current branch name\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxwroc%2Fgit-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxwroc%2Fgit-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxwroc%2Fgit-prompt/lists"}