{"id":17721815,"url":"https://github.com/sinbad/gitscripts","last_synced_at":"2025-06-12T10:08:11.132Z","repository":{"id":139583811,"uuid":"285550629","full_name":"sinbad/GitScripts","owner":"sinbad","description":"A series of useful Git scripts that I use","archived":false,"fork":false,"pushed_at":"2024-05-28T16:35:08.000Z","size":26,"stargazers_count":19,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T21:49:58.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/sinbad.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-06T11:15:38.000Z","updated_at":"2024-06-06T14:42:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e10fa37-6ba5-4b69-9c98-8c0441956075","html_url":"https://github.com/sinbad/GitScripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sinbad/GitScripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FGitScripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FGitScripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FGitScripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FGitScripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinbad","download_url":"https://codeload.github.com/sinbad/GitScripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FGitScripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259444930,"owners_count":22858545,"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-10-25T15:36:20.742Z","updated_at":"2025-06-12T10:08:11.116Z","avatar_url":"https://github.com/sinbad.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Steve's Git (LFS+Locking) Helper Scripts\n\nThis is a collection of Powershell scripts I use to help me manage a few tricky\nGit repo tasks, mostly those related to using [Git LFS](https://git-lfs.github.com/)\nand its [file locking feature](https://github.com/git-lfs/git-lfs/wiki/File-Locking). \n\nAll these scripts work with the regular Powershell 5.1 shipped with Windows 10, \nbut should also work fine with later versions.\n\nWrapper .bat files are provided in case you want to call these from somewhere\nother than a Powershell prompt.\n\n## Push And Unlock Files\n\nPush a branch to a remote, and unlock any files which you pushed (that aren't modified)\n\n```\nUsage:\n  git-lfs-push-and-unlock.ps1 [options] \u003cremote\u003e [\u003cref\u003e...]\n \nArguments:\n  \u003cremote\u003e     :  The remote to push to (required)\n  \u003cref\u003e...     :  One or more refs to push (optional, current branch assumed\n\nOptions:\n  -dryrun      : Don't perform actions, just report what would happen\n  -verbose     : Print more\n  -help        : Print this help\n```\n\nI added a feature to the [UE4 Git LFS Plugin](https://github.com/SRombauts/UE4GitPlugin) \nwhich automatically unlocked files on push, this script is a version of that you \ncan run from anywhere. I find it useful when running a mixture of in-UE and\nout-of-UE workflow. \n\nIt figures out which lockable LFS files you're pushing, and unlocks them\nif the push was successful, so long as you don't have further uncommitted\nmodifications.\n\n## Unlock unchanged files\n\nIf you suspect that you have some file locks you don't need, run this command\nand it will unlock anything you have locked, which you don't have outstanding\nchanges for. \n\n```\nUsage:\n  git-lfs-unlock-unchanged.ps1 [options]\n\nOptions:\n \n  -dryrun      : Don't perform actions, just report what would happen\n  -verbose     : Print more\n  -help        : Print this help\n```\n\n\"Unchanged\" means that there are no uncommitted changes, *and* no commits on\nthis branch that contain those files that haven't been pushed to your default\nremote yet.\n\n## Fix file attributes\n\nGit LFS makes lockable files read-only on checkout or unlock to prevent\naccidental changes. Sometimes the attributes can get out of sync though, \nso this script checks them all and fixes where necessary.\n\n```\nUsage:\n  git-lfs-fix-attributes.ps1 [options]\n\nOptions:\n \n  -dryrun      : Don't perform actions, just report what would happen\n  -verbose     : Print more\n  -help        : Print this help\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinbad%2Fgitscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinbad%2Fgitscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinbad%2Fgitscripts/lists"}