{"id":21236660,"url":"https://github.com/maxg87/git-utils","last_synced_at":"2025-03-15T03:14:03.056Z","repository":{"id":252778828,"uuid":"841426992","full_name":"MaxG87/git-utils","owner":"MaxG87","description":"Small utilities for tedious workflows","archived":false,"fork":false,"pushed_at":"2024-08-29T20:35:14.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T18:50:06.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxG87.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}},"created_at":"2024-08-12T11:40:15.000Z","updated_at":"2024-08-29T20:35:17.000Z","dependencies_parsed_at":"2024-08-29T22:40:29.931Z","dependency_job_id":null,"html_url":"https://github.com/MaxG87/git-utils","commit_stats":null,"previous_names":["maxg87/git-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxG87%2Fgit-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxG87%2Fgit-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxG87%2Fgit-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxG87%2Fgit-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxG87","download_url":"https://codeload.github.com/MaxG87/git-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676775,"owners_count":20329434,"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-11-21T00:13:10.316Z","updated_at":"2025-03-15T03:14:03.037Z","avatar_url":"https://github.com/MaxG87.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Utilities\n\nThis repository collects some utilities which are required on a frequent basis\nbut too complex for a Bash one-liner.\n\n## Installation\n\nThe explanation assumes that all scripts were downloaded already. The most\nconvenient way to do this is to clone the repository.\n\nInstallation of the scripts is done by copying them to a directory in the\n`PATH` and to make them executable. For a system-wide installation, `sudo\ninstall \u003cSCRIPT\u003e /usr/local/bin` can be used. For an installation only for the\ncurrent user, `install \u003cSCRIPT\u003e ~/.local/bin` is recommended.\n\n\n## follow-remote-merge\n\n### Usage\n\n```\n./follow-remote-merge: [OPTION]... [target-branch]\n\nFollow a merge that was performed on a remote platform, e.g. GitHub or GitLab.\nIf HEAD is contained in the target branch, HEAD is switched to the target\nbranch and the source branch is deleted.\n\nThe target branch defaults to `develop`, `main`, or `master`, in that\norder.\n\nOPTIONS:\n\n  -C DIRECTORY Execute git commands in DIRECTORY. Defaults to PWD.\n  -f, --force  Skip checks when moving to target branch.\n  -h, --help   Print this message and exit.\n\nExamples:\nfollow-remote-merge\nfollow-remote-merge develop\nfollow-remote-merge -C ~/repos/some-repo -f weird-default-branch\n```\n\n## migrate-from\n\n### Usage\n\n```\n./migrate-from: [OPTION]... REMOTE_URI [SRC_BRANCH]\n\nSet the currently active local branch to SRC_BRANCH from the repository at\nREMOTE_URI. The history of the local branch is lost and replaced with the\nhistory of SRC_BRANCH.\n\nIF SRC_BRANCH is not given, the default branch of the remote repository is used.\n\nThe REMOTE_URI is the URI of the remote repository. It can be a URL or a path to\na local repository. It will be added to the current repository as a remote\nrepository with a random name but removed after the operation.\n\n\nOPTIONS:\n\n  -C DIRECTORY Execute git commands in DIRECTORY. Defaults to PWD.\n  -h, --help   Print this message and exit.\n\nExamples:\nmigrate-from \"/path/to/repo\"\nmigrate-from \"/path/to/repo\" develop\nmigrate-from \"git@github.com:MaxG87/git-utils.git\"\n```\n\n## do-on-all-gits\n\n### Usage\n\n```\n./do-on-all-gits: [OPTION]... [--] COMMAND\n\nExecute COMMAND in all git repositories found in the working directory.\n\nThe first token not matching an option is considered to be start of COMMAND to\nrun in each repository. If unsure, use '--' to mark the end of options.\n\nBe aware that all kind of shell expansions happen before the command is\nexecuted. In particular, globbing (e.g. '*.png') will match files in the\ncurrent directory, not in the git repositories. In order to achieve this, you\nneed to run the command in a subshell, e.g. 'sh -c \"echo *.png\"'.\n\n\nOPTIONS:\n\n  -C DIRECTORY Parent directory of the git repositories. Default is the current\n               directory.\n  -I STRING    Replace occurrences of STRING in COMMAND with the path to the\n               git repository. Default is '%'.\n  -P N         Run up to N processes in parallel. Default is 0, meaning run as\n               many processes as possible.\n  -h, --help   Print this message and exit.\n  --           End of options. The COMMAND must be specified after this.\n\n\nExamples:\ndo-on-all-gits -P 4 -I % -- git -C % pull\ndo-on-all-gits -C ~/repositories -I % -- echo \"Repository: %\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxg87%2Fgit-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxg87%2Fgit-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxg87%2Fgit-utils/lists"}