{"id":25436664,"url":"https://github.com/sebastianhaigh/scripts","last_synced_at":"2026-05-11T07:20:31.127Z","repository":{"id":277823509,"uuid":"933594397","full_name":"SebastianHaigh/scripts","owner":"SebastianHaigh","description":"Helpful scrips for git and other things","archived":false,"fork":false,"pushed_at":"2025-02-16T11:03:41.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T12:18:01.036Z","etag":null,"topics":["bash","git","scripts","tmux","tools"],"latest_commit_sha":null,"homepage":"","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/SebastianHaigh.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":"2025-02-16T10:56:44.000Z","updated_at":"2025-02-16T11:07:10.000Z","dependencies_parsed_at":"2025-02-16T12:18:04.903Z","dependency_job_id":"64cb8aae-1bc8-4fb7-8ed0-d1d456ba1ff2","html_url":"https://github.com/SebastianHaigh/scripts","commit_stats":null,"previous_names":["sebastianhaigh/scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianHaigh%2Fscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianHaigh%2Fscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianHaigh%2Fscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianHaigh%2Fscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SebastianHaigh","download_url":"https://codeload.github.com/SebastianHaigh/scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264766,"owners_count":22041794,"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":["bash","git","scripts","tmux","tools"],"created_at":"2025-02-17T08:21:29.753Z","updated_at":"2026-05-11T07:20:31.065Z","avatar_url":"https://github.com/SebastianHaigh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scripts\nHelpful scrips for git and other things\n\n## Git scripts\n\nA collection of scripts for frequent git tasks on the command line. These scripts must be run in a directory under git source control.\n\n### gadd: git add\n\nThe `gadd` script will output a numbered list of files with unstaged changes in the current repo, and a prompt for the user to enter a number.\n\n```\n\u003e gadd\nModified files:\n     1  example/File1\n     2  example/File2\n     3  someOtherFile1\n     4  someOtherFile2\nSelect file to add:\n```\n\nEnter the number for the file you want to stage and the script will run `git add --patch` for that file, allowing changes to be selectively staged.\n\n### gres: git restore\n\nLike `gadd` but runs `git restore --patch` for the selected file. Allowing changes to be selectively restored.\n\n### gdiff: git diff\n\nThe `gdiff` script will output a numbered list of files with unstaged changes in the current repo, and a prompt for the user to enter a number.\n\n```\n\u003e gdiff\nModified files:\n     1  example/File1\n     2  example/File2\n     3  someOtherFile1\n     4  someOtherFile2\nSelect file to diff:\n```\n\nSelecting a file will show the diff for that file.\n\n### gdiffc: git diff (for commits)\n\nThe `gdiffc` script will output a numbered list of commits, for all commits upto, but not including, the most recent merge commit in the history. Commits are listed in order starting with the most recent.\n\n```\n\u003e gdiffc\n     1  c25a503dd4 Add support for X\n     2  430f4f2d32 Make change to Y\n     3  8e5550cda9 Move function X to file Z\nSelect a commit to diff:\n```\n\nSelecting a commit will show the diff between that commit and its parent, i.e., the diff of all changes made by the selected commit.\n\n### greb: git interactive rebase\n\nThe `greb` script will output a numbered list of commits, for all commits upto, but not including, the most recent merge commit in the history. Commits are listed in order starting with the most recent.\n\n```\n\u003e greb\n     1  c25a503dd4 Add support for X\n     2  430f4f2d32 Make change to Y\n     3  8e5550cda9 Move function X to file Z\nSelect a commit to start rebase:\n```\n\nSelecting a commit will run `git rebase -i \u003cselected commit\u003e^` starting an interactive rebase session for the selected commit and all more recent commits.\n\n### gfix: git fixup\n\nThe `gfix` script will output a numbered list of commits, for all commits upto, but not including, the most recent merge commit in the history. Commits are listed in order starting with the most recent.\n\n```\n\u003e gfix\n     1  c25a503dd4 Add support for X\n     2  430f4f2d32 Make change to Y\n     3  8e5550cda9 Move function X to file Z\nSelect a commit to fixup:\n```\n\nSelecting a commit will create a fixup commit from all currently staged changes. The fixup will target the selected commit.\n\n### gck: git checkout\n\nThe `gck` script will output a numbered list of local branches.\n\n```\n\u003e gck\nLocal branches:\n     1  * branchX  c25a503dd4 [origin/branchX] Some commit message for X\n     2    branchY  68a62e4f04 Some commit message for Y\n     3    branchZ  436206cd84 [origin/branchZ] Some commit message for Z\nSelect branch to checkout:\n```\n\nSelecting a branch will checkout that branch.\n\n\nTODO: Document more of the scripts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianhaigh%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianhaigh%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianhaigh%2Fscripts/lists"}