🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 31 (from laksa046)

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://bill.harding.blog/2010/01/08/git-move-commit-to-another-branch/
Last Crawled2026-04-03 12:09:14 (3 days ago)
First Indexed2019-05-07 14:13:54 (6 years ago)
HTTP Status Code200
Meta TitleGit move commit to another branch – Relentless Simplicity
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
Rubymine’s stellar Git integration means that I seldom have to tinker with Git on the command line, but an exception to this is when I switch branches and forget to switch back before making my next commit. D’oh! The answer is git cherry-pick. The syntax is simple: git cherry-pick [commit ID] You can run “git log” to get the ID of your commit. You can also use a graphical tool like Giggle, which lets you see all commits to all branches. If you had the misfortune of your checkin not being on any given branch, you can run “git reflog” to see all checkins to all branches, and merge your master branch with the fake branch that your checkin went to. See Stack Overflow for more details on what to do in this scenario.
Markdown
[Skip to content](https://bill.harding.blog/2010/01/08/git-move-commit-to-another-branch/#content) ![](https://bill.harding.blog/wp-content/uploads/2019/05/cropped-san-pedro-la-laguna.jpg) [Relentless Simplicity](https://bill.harding.blog/) Somebody has to do something, and it's just incredibly pathetic that it has to be us. Posted on [January 8, 2010](https://bill.harding.blog/2010/01/08/git-move-commit-to-another-branch/) by [Bill](https://bill.harding.blog/author/admin/) # Git move commit to another branch Rubymine’s stellar Git integration means that I seldom have to tinker with Git on the command line, but an exception to this is when I switch branches and forget to switch back before making my next commit. D’oh\! The answer is git cherry-pick. The syntax is simple: ``` git cherry-pick [commit ID] ``` You can run “git log” to get the ID of your commit. You can also use a graphical tool like Giggle, which lets you see all commits to all branches. If you had the misfortune of your checkin not being on any given branch, you can run “git reflog” to see all checkins to all branches, and merge your master branch with the fake branch that your checkin went to. See [Stack Overflow](http://stackoverflow.com/questions/366093/git-commit-against-tag-with-no-branch) for more details on what to do in this scenario. Categories[Git](https://bill.harding.blog/category/git/) ## One Reply to “Git move commit to another branch” 1. ![](https://secure.gravatar.com/avatar/bfcc9047bea80035a936648dc1912ec4?s=100&d=retro&r=g) **Gavin** says: [December 23, 2010 at 2:26 am](https://bill.harding.blog/2010/01/08/git-move-commit-to-another-branch/#comment-492) Thanks for that; just came in very handy. I cherry-picked two commits (in the one command) from a branch to master. That meant I had duplicate commits. I wanted to rebase the branch to master so the branch could take advantage of these commits, but I didn’t want the branch to \_contain\_ the commits. \$ git rebase –onto master 286d5dce1 I trusted git to ignore the duplicate commits. It ignored the first but reapplied the second. I had the same commit twice in my ‘git log’, and the content was even duplicated in the file\! It was easy to fix this with a “git rebase -i HEAD~4” and throw away the last commit. Perhaps if I’d cherry-picked one commit at a time, git would have detected and ignored the duplicates later. And of course, I could have used interactive rebase to be sure… [Reply](https://bill.harding.blog/2010/01/08/git-move-commit-to-another-branch/?replytocom=492#respond) ### Leave a Reply [Cancel reply](https://bill.harding.blog/2010/01/08/git-move-commit-to-another-branch/#respond) ## Post navigation [Previous PostPrevious Javascript play sound (wav, MP3, etc) in one line](https://bill.harding.blog/2010/01/07/play-sound-wav-mp3-etc-with-one-line-of-javascript/) [Next PostNext Best Linux Git GUI/Browser](https://bill.harding.blog/2010/01/10/best-linux-git-guibrowser/) ## Recent Posts - [Notes from Montpellier Hertz Return (April 2026)](https://bill.harding.blog/2026/04/02/notes-from-montpellier-hertz-return-april-2026/) - [Data roundup: Which code models performing best this month (April 2026)?](https://bill.harding.blog/2026/04/02/which-models-are-best-this-month-april-2026/) - [The Dilbert Afterlife Takeaways: Too Clever by Half](https://bill.harding.blog/2026/01/22/the-dilbert-afterlife-takeaways-too-clever-by-half/) - [Did the CEO of Google really say that AI only increased productivity by 10%?](https://bill.harding.blog/2025/10/15/did-the-ceo-of-google-really-say-that-ai-only-increased-productivity-by-10/) - [Incentives make the world go round: are there any other comparable prediction tools?](https://bill.harding.blog/2025/05/05/incentives-they-make-the-world-go-round/) - [Copilot vs. Cursor vs. Anthropic vs. DeepSeek vs. OpenAI LLM Examples from 2025](https://bill.harding.blog/2025/03/09/copilot-vs-cursor-vs-anthropic-vs-deepseek-vs-openai-llm-examples-from-2025/) - [Understanding Rrule’s bysetpos property](https://bill.harding.blog/2025/02/02/understanding-rrules-bysetpos-property/) - [Visual Studio Code (+ Cursor) IDE Setup on macOS for Jetbrains-experienced Programmers](https://bill.harding.blog/2025/02/01/visual-studio-setup-and-use-on-macos-in-2024-for-an-experienced-jetbrains-rubymine-user/) - [Attention pendulum (goal setting)](https://bill.harding.blog/2024/12/30/attention-pendulum-goal-setting/) - [Tim Ferriss explains how identifying “super tasks” in his to-do list helps plan his day](https://bill.harding.blog/2024/12/11/tim-ferriss-explains-how-identifying-super-tasks-in-his-to-do-list-helps-plan-his-day/) ## Recent Comments - Rich on [Fixed: My i7 Intel Dell Laptop is Ridiculously Slow](https://bill.harding.blog/2017/04/08/fixed-my-i7-intel-dell-laptop-is-ridiculously-slow/#comment-15224) - [INP Technologies](https://www.inp.co.in/) on [Fixed: My i7 Intel Dell Laptop is Ridiculously Slow](https://bill.harding.blog/2017/04/08/fixed-my-i7-intel-dell-laptop-is-ridiculously-slow/#comment-14374) - gazza on [Twilio’s toll/click fraud runs up big customer bills: what to do?](https://bill.harding.blog/2019/08/13/twilios-incentives-to-allow-customer-fraud/#comment-13960) - [Naina k](https://dellservicescentre.in//) on [Fixed: My i7 Intel Dell Laptop is Ridiculously Slow](https://bill.harding.blog/2017/04/08/fixed-my-i7-intel-dell-laptop-is-ridiculously-slow/#comment-13840) - Luca on [Fixed: My i7 Intel Dell Laptop is Ridiculously Slow](https://bill.harding.blog/2017/04/08/fixed-my-i7-intel-dell-laptop-is-ridiculously-slow/#comment-13038) ## Categories - [AI](https://bill.harding.blog/category/ai/) - [Competition](https://bill.harding.blog/category/competition/) - [Design](https://bill.harding.blog/category/design/) - [Entrepreneurship](https://bill.harding.blog/category/entrepreneurship/) - [Git](https://bill.harding.blog/category/git/) - [Hiring](https://bill.harding.blog/category/hiring/) - [Javascript](https://bill.harding.blog/category/javascript/) - [Linux](https://bill.harding.blog/category/linux/) - [Linux to Macbook](https://bill.harding.blog/category/linux-to-macbook/) - [Motivation](https://bill.harding.blog/category/motivation/) - [Mysql](https://bill.harding.blog/category/mysql-2/) - [Networking](https://bill.harding.blog/category/networking/) - [Productivity](https://bill.harding.blog/category/productivity/) - [Progress](https://bill.harding.blog/category/progress/) - [Pursuit of excellence](https://bill.harding.blog/category/pursuit-of-excellence/) - [Rails](https://bill.harding.blog/category/rails/) - [Rants](https://bill.harding.blog/category/rants/) - [Technology](https://bill.harding.blog/category/technology/) - [Tool Reviews](https://bill.harding.blog/category/tool-reviews/) - [Tough Decisions](https://bill.harding.blog/category/tough-decisions/) - [Uncategorized](https://bill.harding.blog/category/uncategorized/) - [User Experience](https://bill.harding.blog/category/user-experience/) ## Pages - [About Bill Harding](https://bill.harding.blog/about/) - [Best software engineering metrics](https://bill.harding.blog/best-software-engineering-metrics/) - [Bill Harding coding velocity](https://bill.harding.blog/bill-harding-coding-velocity/) ## Meta - [NoteApps.info](https://www.noteapps.info/) - [TaskApps.info](https://taskapps.info/) - [Best Evernote Alternative of 2023](https://www.amplenote.com/best_evernote_alternative_2023) - [Best Todoist Alternative of 2023](https://www.amplenote.com/best_todoist_alternative_2023) - [Best Roam Alternative of 2023](https://www.amplenote.com/best_roam_alternative_2023) - [Log in](https://bill.harding.blog/wp-login.php) - [Entries feed](https://bill.harding.blog/feed/) ## Plausible [Proudly powered by WordPress](https://wordpress.org/)
Readable Markdown
Rubymine’s stellar Git integration means that I seldom have to tinker with Git on the command line, but an exception to this is when I switch branches and forget to switch back before making my next commit. D’oh\! The answer is git cherry-pick. The syntax is simple: ``` git cherry-pick [commit ID] ``` You can run “git log” to get the ID of your commit. You can also use a graphical tool like Giggle, which lets you see all commits to all branches. If you had the misfortune of your checkin not being on any given branch, you can run “git reflog” to see all checkins to all branches, and merge your master branch with the fake branch that your checkin went to. See [Stack Overflow](http://stackoverflow.com/questions/366093/git-commit-against-tag-with-no-branch) for more details on what to do in this scenario.
Shard31 (laksa)
Root Hash3973902777444244431
Unparsed URLblog,harding!bill,/2010/01/08/git-move-commit-to-another-branch/ s443