在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:MestreLion/git-tools开源软件地址:https://github.com/MestreLion/git-tools开源编程语言:Python 38.1%开源软件介绍:Git ToolsAssorted git-related scripts and tools Requirements
Bash and Python are already installed by default in virtually all GNU/Linux distros. And you probably already have Git if you are interested in these tools. If needed, the command to install dependencies for Debian-like distros (like Ubuntu/Mint) is:
InstallOn recent Debian, Ubuntu 16.04+, Mint and their derivatives, most tools are in the repositories as
On Fedora 27+ and EPEL 6+, as root:
Gentoo Testing, also as root:
To manually install and run from the repository, just clone the repository and add the installation directory to your cd ~/some/dir
git clone https://github.com/MestreLion/git-tools.git
echo 'PATH=$PATH:~/some/dir/git-tools' >> ~/.profile # or ~/.bashrc UsageIf you installed using your operating system package manager, or if you added the cloned repository to your
The magic? Git considers any executable named
In case the manual pages are not installed in the system, such as when running from the cloned repository, you can still read the built-in help by directly invoking the tool:
UninstallFor the packaged versions, use your repository tools such as For the manual installation, just delete the directory and remove it from your rm -rf ~/some/dir/git-tools
sed -i '/git-tools/d' ~/.profile ToolsThis is a brief description of the tools. For more detailed instructions, see git-branches-renameBatch renames branches with a matching prefix to another prefix Examples:
git-clone-subsetClones a subset of a git repository Uses Clones a Useful for creating a new repository out of a set of files from another repository, migrating (only) their associated history. Very similar to what git-find-uncommitted-reposRecursively list repos with uncommitted changes Recursively finds all git repositories in the given directory(es), runs git-rebase-theirsResolve rebase conflicts and failed cherry-picks by favoring 'theirs' version When using git-restore-mtimeRestore original modification time of files based on the date of the most recent commit that modified them Probably the most popular and useful tool, and the reason this repository was packaged into distros. Git, unlike other version control systems, does not preserve the original timestamp of committed files. Whenever repositories are cloned, or branches/files are checked out, file timestamps are reset to the current date. While this behavior has its justifications (notably when using For more information and background, see http://stackoverflow.com/a/13284229/624066 For TravisCI users, simply add this setting to
Similarly, when using Github Actions, make sure to include - uses: actions/checkout@v2
with:
fetch-depth: 0 git-strip-mergeA Answer for "How to set up a git driver to ignore a folder on merge?", see http://stackoverflow.com/questions/3111515 Example:
ContributingPatches are welcome! Fork, hack, request pull! If you find a bug or have any enhancement request, please open a new issue AuthorRodrigo Silva (MestreLion) [email protected] License and Copyright
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论