{"id":20253213,"url":"https://github.com/jeremylikness/git-fork-branch-cheatsheet","last_synced_at":"2025-07-02T02:07:12.200Z","repository":{"id":77126077,"uuid":"206357071","full_name":"JeremyLikness/git-fork-branch-cheatsheet","owner":"JeremyLikness","description":"My cheat sheet for the git/fork/branch workflow","archived":false,"fork":false,"pushed_at":"2019-09-27T21:44:39.000Z","size":8,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T12:47:16.860Z","etag":null,"topics":["branch-cheatsheet","branching","git","git-workflow"],"latest_commit_sha":null,"homepage":null,"language":null,"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/JeremyLikness.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":"2019-09-04T15:52:32.000Z","updated_at":"2024-01-27T03:17:38.000Z","dependencies_parsed_at":"2023-04-03T19:19:08.207Z","dependency_job_id":null,"html_url":"https://github.com/JeremyLikness/git-fork-branch-cheatsheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JeremyLikness/git-fork-branch-cheatsheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeremyLikness%2Fgit-fork-branch-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeremyLikness%2Fgit-fork-branch-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeremyLikness%2Fgit-fork-branch-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeremyLikness%2Fgit-fork-branch-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeremyLikness","download_url":"https://codeload.github.com/JeremyLikness/git-fork-branch-cheatsheet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeremyLikness%2Fgit-fork-branch-cheatsheet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263061406,"owners_count":23407606,"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":["branch-cheatsheet","branching","git","git-workflow"],"created_at":"2024-11-14T10:22:18.855Z","updated_at":"2025-07-02T02:07:12.175Z","avatar_url":"https://github.com/JeremyLikness.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-fork-branch-cheatsheet\n\nMy cheat sheet 📜 for the git/fork/branch workflow.\n\n## ⚙ Set up\n\n1. Fork it\n2. `git clone \u003cforked repo\u003e`\n3. `git remote add upstream \u003coriginal repo\u003e.git`\n\n## 🔃 Workflow\n\n1. `git pull upstream master`\n2. `git push origin master`\n3. `git checkout -b \u003cbranch\u003e`\n4. Work. Work. Work.\n5. `git push origin \u003cbranch\u003e`\n6. Create PR\n7. Wait for it to be merged, then ...\n8. `git checkout master`\n9. `git pull upstream master`\n10. `git branch -d \u003cbranch\u003e` (or `-D` if necessary)\n11. `git push origin master`\n12. `git push --delete origin \u003cbranch\u003e`\n13. `git pull upstream master`\n14. `git push origin master`\n\n## 🆘 Get out of Jail, Free\n\n(when things go wrong, force fork to sync with upstream)\n\n⚠ **WARNING** only do this if you do _not_ have pending commits. They will be obliterated!\n\n1. `git fetch upstream`\n2. `git reset --hard upstream/master`\n3. `git push origin master --force`\n\n_quod erat demonstrandum_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremylikness%2Fgit-fork-branch-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeremylikness%2Fgit-fork-branch-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremylikness%2Fgit-fork-branch-cheatsheet/lists"}