![]() If you have a lot of git repositories scattered in multiple locations, you may want to create a fileĬontaining each location, and then just load that file with git_status_checker.py, Using a file containing all the base-dirs Repositories, then print the status for all repositories with outstanding commits or that can beĪnd yes, you can use "~" and "*" to specify files and folders, even on Windows. The script will walk each of the given directories ( ~/Dev and ~/Documents) searching for git ![]() Just add the base directories as arguments: > python -m git_status_checker ~/Dev ~/Documents It is possible to tell git-status-checker where to search for git repositories, Specifying directories to search for git repositories: Program, so instead of typing python -m git_status_checker, you can also type: ~/Dev> git-status-checker The installation process will also install git-status-checker as a directly-executable Just replace python -m git_status_checker with python /path/to/git_status_checker.py. If you are running git_status_checker.py as a script, rather than as an installed module, NOTE: Many of the examples below assumes git-status-checker is installed.Git repositories, and for every repository it finds, it will check to see if it has outstandingĬhanges to be committed, or commits that have not been pushed to origin, That's it! git-status-checker will look in all sub-folders, searching for Run git_status_checker.py as a python script: ~/Dev> python /path/to/git_status_checker.py If you have installed git-status-checker, you can then just type: ~/Dev> python -m git_status_checkerĪlternatively, if you have simply downloaded git_status_checker, then just ![]() Open your command prompt / terminal and navigate to where you keep your git repositories, e.g.: cd ~/Dev To remember where you placed the script, you can always just run it usingĮither > python -m git_status_checker or simply > git-status-checker. However, the advantage of installing git-status-checker with pip is that you don't have Just download the git_status_checker.py script (or clone the whole repository),Īnd run the script using whatever Python interpreter you have (Python 3+ only, no legacy python), e.g.: > python /path/to/git-status-checker/git_status_checker/git_status_checker.py The only requirement is that you have pyyaml installed (is used to save script configuration files). Git-status-checker by running git_status_checker.py as a plain python script. Installation is not strictly required, it is perfectly possible to use You can download or clone the git-status-checker repository, and thenĪdd a -e flag when installing with pip to install in "editable" mode: if you want to make changes to how git-status-checker works, If you want to use the most recent developer version from GitHub,Į.g. You can install git-status-checker with pip: > pip install git-status-checkerīy default, this will get you the most recent release from PyPI. It has changes that have not been pushed, or if origin has changes that have not been pulled. (2) checks if any of the repositories have uncommitted changes or needs to be updated with origin, i.e. (1) finds git repositories given a list of base directories, and Yet another git status checker, in python.īecause none of the bash-based ones were working on my Windows box with git-bash.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |