{"id":13501828,"url":"https://github.com/c0riolis/tifu","last_synced_at":"2025-03-29T10:32:16.772Z","repository":{"id":217447643,"uuid":"79047998","full_name":"c0riolis/tifu","owner":"c0riolis","description":"A tool that helps you to restore commits erased by a force push","archived":false,"fork":false,"pushed_at":"2017-01-15T17:44:29.000Z","size":6,"stargazers_count":57,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T00:55:58.711Z","etag":null,"topics":["bitbucket","git","github","gitlab"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/c0riolis.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}},"created_at":"2017-01-15T17:35:01.000Z","updated_at":"2024-01-04T16:10:34.000Z","dependencies_parsed_at":"2024-01-16T14:21:06.949Z","dependency_job_id":"2a1660a6-2da6-43b2-9b55-0a3cb1bdd3bb","html_url":"https://github.com/c0riolis/tifu","commit_stats":null,"previous_names":["c0riolis/tifu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0riolis%2Ftifu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0riolis%2Ftifu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0riolis%2Ftifu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0riolis%2Ftifu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c0riolis","download_url":"https://codeload.github.com/c0riolis/tifu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246173855,"owners_count":20735405,"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":["bitbucket","git","github","gitlab"],"created_at":"2024-07-31T22:01:52.142Z","updated_at":"2025-03-29T10:32:16.370Z","avatar_url":"https://github.com/c0riolis.png","language":"Python","readme":"# TIFU (Today I Fucked Up)\n\n## Overview\n\nTIFU is a tool that helps to restore commits erased by a force push on\nGithub, Gitlab and Bitbucket.\n\n## Requirements\n\nPython 3.5+\n\n## Installation\n\nJust clone, install dependencies, and you're ready to go!\n\n```bash\ngit clone git@github.com:c0riolis/tifu.git\ncd tifu\npip3 install -r requirements.txt --user\n./tifu.py --help\n```\n\n## How to use it?\n\nThe simplest way to run the tool is to launch it with a remote as argument:\n\n```bash\n./tifu.py git@github.com:namespace/project.git\n```\n\nOr\n\n```bash\n./tifu.py https://github.com/namespace/project.git\n```\n\nIt will automatically infer the API, repository name and hostname to use.\n\nIf you want to run it on your own instance of Gitlab for example, this will\nfail since the tool can't determine which API to use. Just specify it:\n\n```bash\n./tifu.py git@mydomain.com:namespace/project.git --api gitlab\n```\n\nThis is equivalent to the following command:\n\n```bash\n./tifu.py --api gitlab --host mydomain.com --repo namespace/project\n```\n\nYou can also just connect to a specific API and select the repository\ninteractively:\n\n```bash\n./tifu.py --api bitbucket\n```\n\nWhich works for your own instances as well:\n\n```bash\n./tifu.py --api github --host mydomain.com\n```\n\n## Usage\n\n```raw\nusage: tifu.py [-h] [-a] [--host HOST] [-n REPO] [remote]\n\npositional arguments:\n  remote                git remote\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -a , --api            API to use (github, gitlab, bitbucket)\n  --host HOST           server hostname\n  -r REPO, --repo REPO  repository name (namespace/project)\n```\n\n## How does it work?\n\nGit repository managers are usually using event systems to build users' threads.\nThese events are accessible via APIs and are providing various pieces of information.\n\nIn this case, we are using events generated on push to get the ID of the\nprevious HEAD and create a branch pointing to it.\n\nOld HEAD's objects are usually still available since they are not removed until\nthe repository is garbage collected on the server side.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0riolis%2Ftifu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc0riolis%2Ftifu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0riolis%2Ftifu/lists"}