{"id":22705732,"url":"https://github.com/tox82/git-bashrc","last_synced_at":"2026-01-07T09:36:55.624Z","repository":{"id":78745363,"uuid":"27131580","full_name":"ToX82/git-bashrc","owner":"ToX82","description":"A little hack to .bashrc to facilitate the use of GIT","archived":false,"fork":false,"pushed_at":"2015-01-14T13:34:27.000Z","size":400,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T21:19:22.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/ToX82.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}},"created_at":"2014-11-25T15:16:26.000Z","updated_at":"2018-08-25T14:51:51.000Z","dependencies_parsed_at":"2023-02-23T22:25:38.115Z","dependency_job_id":null,"html_url":"https://github.com/ToX82/git-bashrc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2Fgit-bashrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2Fgit-bashrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2Fgit-bashrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2Fgit-bashrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ToX82","download_url":"https://codeload.github.com/ToX82/git-bashrc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246239658,"owners_count":20745746,"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":[],"created_at":"2024-12-10T09:12:45.013Z","updated_at":"2026-01-07T09:36:55.582Z","avatar_url":"https://github.com/ToX82.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"git-bashrc\n==========\n\nThis is a little hack to .bashrc to facilitate the use of GIT through colors to indicate the status of the repository.\n\n![preview image](http://emanuele.itoscano.com/files/files/blog/git-bashrc.png)\n\n\nIf you want a shell like that, just add this lines at the end of your .bashrc file:\n\n\n    Color_Off=\"\\[\\033[0m\\]\"    # Text Reset\n\tBlue=\"\\[\\033[0;94m\\]\"      # Blue\n\tYellow=\"\\[\\033[1;33m\\]\"    # Yellow\n\tGreen=\"\\[\\033[0;32m\\]\"     # Green\n\tRed=\"\\[\\033[0;91m\\]\"       # Red\n\n\texport PS1='$(\n\t  if [ -d .git ]; then \n\t    status=\"$(git status)\" \u003e /dev/null 2\u003e\u00261; \n\n\t    if [[ $status == *\"to be committed\"* ]]; then \n\t      # Changes to be committed\n\t      echo \"'$Yellow'\"$(__git_ps1 \" {%s} \") '$Color_Off'\\w\\$ \"\"; \n\n\t    elif [[ $status == *\"Changes not staged\"* ]]; then \n\t      # Changes to stage\n\t      echo \"'$Red'\"$(__git_ps1 \" {%s} \") '$Color_Off'\\w\\$ \"\"; \n\n\t    elif [[ $status == *\"Untracked files:\"* ]]; then \n\t      # Untracked files\n\t      echo \"'$Blue'\"$(__git_ps1)* '$Color_Off'\\w\\$ \"\"; \n\n\t    elif [[ $status == *push* ]]; then \n\t      # Push needed\n\t      echo \"'$Green'\"$(__git_ps1)* '$Color_Off'\\w\\$ \"\"; \n\n\t    else\n\t      # Clean repository - nothing to commit\n\t      echo \"'$Green'\"$(__git_ps1) '$Color_Off'\\w\\$ \"\"; \n\n\t    fi\n\t  else \n\t    # Prompt when not in GIT repo\n\t    echo \"${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ \";\n\t  fi\n\t)'\n    \nEnjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftox82%2Fgit-bashrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftox82%2Fgit-bashrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftox82%2Fgit-bashrc/lists"}