The Artima Developer Community
Sponsored Link

Java Buzz Forum
Interactive rebase in SourceTree

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mathias Bogaert

Posts: 618
Nickname: pathos
Registered: Aug, 2003

Mathias Bogaert is a senior software architect at Intrasoft mainly doing projects for the EC.
Interactive rebase in SourceTree Posted: Jun 16, 2014 8:52 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Mathias Bogaert.
Original Post: Interactive rebase in SourceTree
Feed Title: Scuttlebutt
Feed URL: http://feeds.feedburner.com/AtlassianDeveloperBlog
Feed Description: tech gossip by mathias
Latest Java Buzz Posts
Latest Java Buzz Posts by Mathias Bogaert
Latest Posts From Scuttlebutt

Advertisement

Over the last year we’ve introduced interactive rebase support in SourceTree on both Mac and Windows to help developers rewrite their commit history easier than ever. Often we’ve found this feature to be regarded as both mysterious and dangerous by many DVCS users, so we thought we’d help you learn what this feature does, how it can be a great asset in your workflow, and how to use it safely. What is “rebasing interactively?” In short, rebasing is a way of changing your commit history. You’ll often hear terms such as “replaying your commits” and “rewriting your commit history,” which can come across as confusing if you’re new to Git concepts. Why do we call it rebasing, though? Imagine your commit history looks like this:     If I were to rebase from commit a4d3a then what I’m really saying is “base all future commits on this one,” hence the term rebase. Now, imagine each commit is like a frame on a reel of film. When we say “rewind your commits” it literally means, like a reel of film, to rewind to a specific frame in time. So the term replay means just what you think, to go through each “frame” on that reel starting from the point you rewound your commits to.     Now you’ve learned about rewinding and rebasing! So how does interactive rebasing fit into this? Well, Git allows you to personally get involved in the process of replaying your commits to give you more control in changing your repository’s history. Git has a special file called git-rebase-todo which is simply a text file containing a list of the commits you’re about to get involved in. By editing this text file you can control what happens when you replay your commits. Great, now you know all that we do! Now come work for us. Seriously though, this is the secret of the black box. Of course Git does other magical wonders in making sure all of this goes smoothly. SourceTree’s involvement So how does SourceTree fit into this? SourceTree is the middleman between you and Git, making it really easy to change your commit history through a simple user interface. You can drag and drop commits to reorder them or squash them, you can delete commits, reword the commit messages, edit them, or just leave them be. There’s two ways to rebase interactively: The first is to right-click (or context-click) on a commit and hit Rebase children of <sha> interactively… and the second is to hit the Repository menu and go to Interactive rebase. Let’s dive into what’s available to you. Squashing If you’re like me, you panic commit. What’s panic committing? It’s where you write an awesome line of code and fear that the sun will throw out a huge mass of electrically charged particles causing widespread power shortage resulting in the loss of your work. So you commit things like NSLog(“test”). Squashing allows you to quite literally “squash” commits together, resulting in more well-thought-out, meaningful commits – so instead of having […]

The post Interactive rebase in SourceTree appeared first on Atlassian Blogs.

Read: Interactive rebase in SourceTree

Topic: Automating the Continuous Integration of Android Projects With Gradle Using Jenkins on Windows Previous Topic   Next Topic Topic: Groovy is a language

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use