Trikalabs
  • Home
  • Best online TDD videos
  • Book Suggestions
  • About Me
  • Contact
Trikalabs
No Result
View All Result

Git rebase with SourceTree

by fragi
May 13, 2021
in Tools
Share on FacebookShare on Twitter

There are many benefits of having a source control. With source control we can check the history of a file, who and when modified a file, what was a reason for a change and which files changed together. Also with tags we can track important milestones.

Git is one of the most popular version control system, and Sourcetree is one of the tools that provide a visual interface  and make it easier to work with Git.

In this article we will see how we can git rebase using Sourcetree. Rebase as opposed to merge can lead to a more readable git history.

 

Let’s start by creating a Swift project and make sure you select to create a git repository .

Now let’s open the Sourcetree and tap on the local tab and then after scan a directory select the project you just created.

We notice that there is only one branch (master) currently in the repository.

By tapping on the branch button we can create a new branch, name it feature/aFeature.

Now let’s do a simple change and commit the changes.

Now let’s checkout the master branch and commit also a change

So far the git tree looks like this:

Let’s now rebase the feature branch on to master. Firstly let’s checkout on to the feature branch, then right click on the master branch and select rebase current changes onto master.

Now the git tree looks like this:

One clean stream of commits!

Worth notice that the commits from master although happened after the commit of the feature branch, after the rebase all commits of master are showing before all the commits of the feature branch.

Tags: GitSourceTree
fragi

fragi

Related Posts

Delete Derived Data – zsh command
Tools

Delete Derived Data – zsh command

April 22, 2022

There are some times that we have to delete the derived data that Xcode produces.There are many ways to achieve...

SwiftGen – Statically reference resources
Tools

SwiftGen – Statically reference resources

February 28, 2022

In this article we can see how we can statically reference strings. Let's look on the following example: As...

Postman – Monitors
Postman

Postman – Monitors

February 27, 2022

So we have created our collection with the API request, we an up and running mock server http://trikalabs.com/postman-mock-server/  and a...

Xcode custom template
Tools

Xcode custom template

February 25, 2022

In this article we will create a template that creates a view and a viewModel files.In the previous article http://trikalabs.com/xcode-templates/...

Xcode Templates
Tools

Xcode Templates

February 24, 2022

Xcode provides with a lot of custom templates. In this article we will explore how we can change them. In...

Newman – Run Postman collections tests
Postman

Newman – Run Postman collections tests

February 27, 2022

Newman is a command-line Collection Runner for Postman. We can use newman to run postman collection tests through cli, which...

Next Post
Dependency injection – UIViewController in Storyboard (iOS 13)

Dependency injection - UIViewController in Storyboard (iOS 13)

Test static method on collaborator

Test static method on collaborator

Large Content Viewer

Large Content Viewer

  • Advertise
  • Privacy & Policy
  • Contact

© 2019 Trikalabs Ltd. All rights reserved.

No Result
View All Result
  • Home
  • About Me
  • A curated list with the best free online TDD videos
  • Book Suggestions
  • Pinner Code Club

© 2019 Trikalabs Ltd. All rights reserved.