{"id":19531792,"url":"https://github.com/jiromaykin/rebase-examples","last_synced_at":"2026-06-18T05:32:22.329Z","repository":{"id":64331084,"uuid":"570467642","full_name":"jiromaykin/rebase-examples","owner":"jiromaykin","description":"Learning to Git rebase and squash and stash and amend","archived":false,"fork":false,"pushed_at":"2024-11-02T18:55:37.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T03:23:07.049Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"","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/jiromaykin.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":"2022-11-25T09:06:45.000Z","updated_at":"2024-11-02T18:55:40.000Z","dependencies_parsed_at":"2024-11-02T19:24:23.061Z","dependency_job_id":"29d2cd04-0113-4f0b-9886-e587d6e4d735","html_url":"https://github.com/jiromaykin/rebase-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jiromaykin/rebase-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiromaykin%2Frebase-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiromaykin%2Frebase-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiromaykin%2Frebase-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiromaykin%2Frebase-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiromaykin","download_url":"https://codeload.github.com/jiromaykin/rebase-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiromaykin%2Frebase-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34478105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["git"],"created_at":"2024-11-11T01:44:28.342Z","updated_at":"2026-06-18T05:32:22.308Z","avatar_url":"https://github.com/jiromaykin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rebase-examples\n\nGo here for [the 'amend'](amend/README.md) workflow.\n\nGo here for [squashing lots of commits](squish/README.md) into 1 commit.\n\n## When to Squash Your Commits\n\nCombine multiple existing commits into a single one. Squashing commits is the preferred way to merge a feature branch back into a long-running branch like \"main\".\n\n### using Git's \"Interactive Rebase\" feature\n\n```$ git rebase -i HEAD~3```\n\nIf you mark one or more lines as \"squash\", they will be combined with the one above (but commit messages are kept, instead use \"fixup\").\n\nAfter entering a commit message for the new, combining commit, the Interactive Rebase is completed.\n\nnow push to the remote, with force, since we rewrote history:\n\n```$ git push --force-with-lease```\n\n---\n\n### Merge conflicts\n\nhttps://www.maykinmedia.nl/blog/2017/nov/20/git-rebasing-make-your-commit-history-pretty/\n\nLearning rebase and squash and stash.\nHere I add a merge conflict.\n\nLet’s say a feature branch is started.\n(git config --global pull.rebase)Let’s say a feature branch is started.\n(git config --global pull.rebase)\n\ngit checkout main \u0026\u0026 git pull origin main\n\ngit rebase -i main\n\nthe WIP commit is fine, I change pick into fixup, :wq and rebase is ‘done’\n\ngit checkout main \u0026\u0026 git pull origin main\nnow push to the remote, with force, since we rewrote history:\n\ngit push --force-with-lease\n\nsquash commits before rebasing on develop.\n\nnow push to the remote, with force, since we rewrote history:\n\ngit push --force-with-lease\n\nSo many merge conflicts!\n\nNew: line: what are my GIT credentials? (Use Personal Access Token only)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiromaykin%2Frebase-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiromaykin%2Frebase-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiromaykin%2Frebase-examples/lists"}