🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 145 (from laksa198)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
3 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.1 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://gitbreeze.dev/git-move-commit-to-another-branch
Last Crawled2026-04-16 09:19:04 (3 days ago)
First Indexed2023-01-24 19:41:25 (3 years ago)
HTTP Status Code200
Meta TitleHow to Git Move Commit to Another Branch Effortlessly | GitBreeze
Meta DescriptionYou’ve made one or more commits, and now realise they’re on entirely the wrong branch. So how can you make Git move a commit to another branch, either a new branch, or perhaps an existing one?
Meta Canonicalnull
Boilerpipe Text
The Problem It's the first hour of work, and the tea / coffee / taurine hasn’t kicked in yet. Having created some commits in Git, you now know they are on the wrong branch. Main, to be exact. You can already hear the pedants in the office tutting. You need to shift these Git commits to another branch, either a new branch, or an existing one. Here’s how to do this. The Solution for a New Branch In this example, there are 3 commits to move. This creates the new branch my-branch , containing all the commits: git branch my-branch This changes master. It deletes the last 3 commits, and resets the index and working files: git reset --hard HEAD~3 Or: To stop the reset if there are changed working files that would get destroyed by --hard , then use --keep instead: git reset --keep HEAD~3 This makes my-branch the current branch, so you can work on it: git checkout my-branch Warning : If after doing this you need to rebase this new branch onto the master, you may need to use --no-fork-point to protect your moved commits, otherwise they might get erased. The Solution for an Existing Branch In this swift example, there are only 4 commits to move. This switches you to the branch you want the commits on, my-branch : git checkout my-branch This merges the master into my-branch , bringing all its commits: git merge master This makes master the current branch again: git checkout master This changes master . It deletes the last 4 commits, and resets the index and working files: git reset --hard HEAD~4 Or: To stop the reset if there are changed working files that would get destroyed by --hard , then use --keep instead: git reset --keep HEAD~4 This switches you back to my-branch to admire the results: git checkout my-branch If you want the simplest and easiest solution to this problem though, why not try our Git client . Free GitBreeze is the AI Git GUI that's  free to use at work, at home, or anywhere . GitBreeze works on Windows, macOS, and Linux. Designed from the ground up for developers who want Git to be clean and easy, our unique UI/UX boosts your software development - learn more and reap the benefits . Help & tools We have a resources page gives an overview of how we can help you as a software engineer. And you can see our Git tips & tools list here. We also have these free downloads: 25 design patterns Git cheat sheet Git tips PDF Customers say... I love any tool that makes my life easier... This is perfect, just the right amount of control . No more, no less. Easy to get started, push and rollback changes... It's a no brainer! Hayden T.
Markdown
[![GitBreeze text and logo](https://gitbreeze.dev/wp-content/uploads/gitbreeze-letterform-name-300x58-1.png)](https://gitbreeze.dev/) Menu - [Resources](https://gitbreeze.dev/resources) - [Pricing](https://gitbreeze.dev/pricing) - [Blog](https://gitbreeze.dev/blog) close [Free Git GUI](https://gitbreeze.dev/downloads) [Other platforms](https://gitbreeze.dev/downloads) # How to Git Move Commit to Another Branch Effortlessly ![](https://gitbreeze.dev/wp-content/uploads/gitbreeze-blog-git-tips-git-move-commit-to-another-branch.jpg) ## The Problem It's the first hour of work, and the tea / coffee / taurine hasn’t kicked in yet. Having created some commits in Git, you now know they are on the wrong branch. Main, to be exact. You can already hear the pedants in the office tutting. You need to shift these Git commits to another branch, either a new branch, or an existing one. Here’s how to do this. ## The Solution for a New Branch In this example, there are 3 commits to move. This creates the new branch **my-branch**, containing all the commits: ![git move commit to another branch](https://gitbreeze.ams3.cdn.digitaloceanspaces.com/website/images/gitbreeze-blog-move-some-git-commits-easily-tramline.png) ``` git branch my-branch ``` This changes master. It deletes the last 3 commits, and resets the index and working files: ``` git reset --hard HEAD~3 ``` **Or:** To stop the reset if there are changed working files that would get destroyed by **\--hard**, then use **\--keep** instead: ``` git reset --keep HEAD~3 ``` This makes **my-branch** the current branch, so you can work on it: ``` git checkout my-branch ``` **Warning**: If after doing this you need to rebase this new branch onto the master, you may need to use **\--no-fork-point** to protect your moved commits, otherwise they might get erased. ## The Solution for an Existing Branch In this swift example, there are only 4 commits to move. This switches you to the branch you want the commits on, **my-branch**: ``` git checkout my-branch ``` This merges the **master** into **my-branch**, bringing all its commits: ``` git merge master ``` This makes **master** the current branch again: ``` git checkout master ``` This changes **master**. It deletes the last 4 commits, and resets the index and working files: ``` git reset --hard HEAD~4 ``` **Or:** To stop the reset if there are changed working files that would get destroyed by **\--hard**, then use **\--keep** instead: ``` git reset --keep HEAD~4 ``` This switches you back to **my-branch** to admire the results: ``` git checkout my-branch ``` If you want the simplest and easiest solution to this problem though, why not [try our Git client](https://gitbreeze.dev/git-client). # Free GitBreeze is the AI Git GUI that's **free to use at work, at home, or anywhere**. GitBreeze works on **Windows, macOS, and Linux.** Designed from the ground up for developers who want Git to be clean and easy, our unique UI/UX boosts your software development - [learn more and reap the benefits](https://gitbreeze.dev/). # Help & tools We have a [resources](https://gitbreeze.dev/resources) page gives an overview of how we can help you as a software engineer. And you can see our [Git tips & tools](https://gitbreeze.dev/resources/git) list here. We also have these free downloads: - [25 design patterns](https://gitbreeze.dev/c-sharp-design-patterns-net-core-examples) - [Git cheat sheet](https://gitbreeze.dev/git-cheat-sheet) - [Git tips PDF](https://gitbreeze.dev/white-paper-7-intermediate-git-tips) # Customers say... I love any tool that makes my life easier... This is **perfect, just the right amount of control**. No more, no less. Easy to get started, push and rollback changes... It's a no brainer\! Hayden T. [Free Git GUI](https://gitbreeze.dev/downloads) [Other platforms](https://gitbreeze.dev/downloads) ### Related posts [![Overwrite local files but keep un-pushed commits](https://gitbreeze.dev/wp-content/uploads/gitbreeze-blog-overwrite-local-files-but-keep-commits-1-150x150.jpg)How to Overwrite Local Files Not Git Commits Effortlessly](https://gitbreeze.dev/overwrite-local-files-but-keep-un-pushed-commits "How to Overwrite Local Files Not Git Commits Effortlessly") [![Git rebase instead of merge](https://gitbreeze.dev/wp-content/uploads/gitbreeze-blog-git-tips-git-rebase-instead-of-merge-150x150.jpg)How to Git Rebase Instead of Merge Effortlessly](https://gitbreeze.dev/git-rebase-instead-of-merge "How to Git Rebase Instead of Merge Effortlessly") [![How to Git reset](https://gitbreeze.dev/wp-content/uploads/gitbreeze-blog-git-tips-git-reset-150x150.jpg)How to Git Reset Effortlessly](https://gitbreeze.dev/git-reset "How to Git Reset Effortlessly") ![Oscar the owl and Vershd logo](https://gitbreeze.dev/wp-content/uploads/gitbreeze-letterform-name-300x58-1.png) © 2026 GitBreeze Ltd. ![St. George's flag of England, the Union Jack flag of the United Kingdom, the European Union flag, and the United Nations flag.](https://gitbreeze.ams3.cdn.digitaloceanspaces.com/website/images/flags.png) Menu - [Home](https://gitbreeze.dev/) - [Downloads](https://gitbreeze.dev/downloads) - [Features](https://gitbreeze.dev/features) - [Pricing](https://gitbreeze.dev/pricing) - [Resources](https://gitbreeze.dev/resources) - [Git Client](https://gitbreeze.dev/git-client) close Menu - [Blog](https://gitbreeze.dev/blog) - [Privacy Policy](https://gitbreeze.dev/about/privacy-policy) - [Cookie Policy](https://gitbreeze.dev/about/cookie-policy) - [Terms & Conditions](https://gitbreeze.dev/about/terms-conditions) - [About](https://gitbreeze.dev/about) - [Help](https://help.gitbreeze.dev/) close
Readable Markdown
![](https://gitbreeze.dev/wp-content/uploads/gitbreeze-blog-git-tips-git-move-commit-to-another-branch.jpg) ## The Problem It's the first hour of work, and the tea / coffee / taurine hasn’t kicked in yet. Having created some commits in Git, you now know they are on the wrong branch. Main, to be exact. You can already hear the pedants in the office tutting. You need to shift these Git commits to another branch, either a new branch, or an existing one. Here’s how to do this. ## The Solution for a New Branch In this example, there are 3 commits to move. This creates the new branch **my-branch**, containing all the commits: ![git move commit to another branch](https://gitbreeze.ams3.cdn.digitaloceanspaces.com/website/images/gitbreeze-blog-move-some-git-commits-easily-tramline.png) ``` git branch my-branch ``` This changes master. It deletes the last 3 commits, and resets the index and working files: ``` git reset --hard HEAD~3 ``` **Or:** To stop the reset if there are changed working files that would get destroyed by **\--hard**, then use **\--keep** instead: ``` git reset --keep HEAD~3 ``` This makes **my-branch** the current branch, so you can work on it: ``` git checkout my-branch ``` **Warning**: If after doing this you need to rebase this new branch onto the master, you may need to use **\--no-fork-point** to protect your moved commits, otherwise they might get erased. ## The Solution for an Existing Branch In this swift example, there are only 4 commits to move. This switches you to the branch you want the commits on, **my-branch**: ``` git checkout my-branch ``` This merges the **master** into **my-branch**, bringing all its commits: ``` git merge master ``` This makes **master** the current branch again: ``` git checkout master ``` This changes **master**. It deletes the last 4 commits, and resets the index and working files: ``` git reset --hard HEAD~4 ``` **Or:** To stop the reset if there are changed working files that would get destroyed by **\--hard**, then use **\--keep** instead: ``` git reset --keep HEAD~4 ``` This switches you back to **my-branch** to admire the results: ``` git checkout my-branch ``` If you want the simplest and easiest solution to this problem though, why not [try our Git client](https://gitbreeze.dev/git-client). ## Free GitBreeze is the AI Git GUI that's **free to use at work, at home, or anywhere**. GitBreeze works on **Windows, macOS, and Linux.** Designed from the ground up for developers who want Git to be clean and easy, our unique UI/UX boosts your software development - [learn more and reap the benefits](https://gitbreeze.dev/). ## Help & tools We have a [resources](https://gitbreeze.dev/resources) page gives an overview of how we can help you as a software engineer. And you can see our [Git tips & tools](https://gitbreeze.dev/resources/git) list here. We also have these free downloads: - [25 design patterns](https://gitbreeze.dev/c-sharp-design-patterns-net-core-examples) - [Git cheat sheet](https://gitbreeze.dev/git-cheat-sheet) - [Git tips PDF](https://gitbreeze.dev/white-paper-7-intermediate-git-tips) ## Customers say... I love any tool that makes my life easier... This is **perfect, just the right amount of control**. No more, no less. Easy to get started, push and rollback changes... It's a no brainer\! Hayden T.
Shard145 (laksa)
Root Hash10936048038144166945
Unparsed URLdev,gitbreeze!/git-move-commit-to-another-branch s443