Peter Morlion logo

Using git bisect to find the origins of code

Every now and then, I encounter some complex legacy code that has been moved around and changed so much, git blame doesn’t help in finding the original commit. Git bisect is the solution here. Why the Original Commit Can Help Sometimes, I read code and (after a while) it becomes clear what it does. But […]

Git rebase and autosquash

This may not be new to you, but I recently discovered another cool feature of Git. Rebasing with the autosquash option allows me to keep a clean log with minimal effort. I’ve written about interactive rebasing before. This makes it even easier. Interactive Rebasing You want to do an interactive rebase when you have a […]

Advanced Git Commands: Rewriting History

Editorial note: I originally wrote this post for ASPE. You can check out the original here, at their site. When developers use Git, they often use a combination of a graphical user interface and the command line. A GUI has a low barrier to entry, but many of us want to leverage the power that […]

Pull Requests aren’t a Policing Strategy

Pull Requests have become a well-known concept in open-source projects, not in the least thanks to GitHub. But pull requests are also finding their way to the enterprise and closed-source projects. Making pull requests part of your team’s workflow might require some changes to your daily routine, but it will result in better code and […]

Incorporating pull requests in your team’s workflow

If you use GitHub, Bitbucket or VSTS regularly, you will be familiar with the term pull request. I believe GitLab uses the term merge request, but that it’s essentially the same thing (but don’t quote me on that). What you do is create some changes, and request another contributor to merge those changes into (usually) […]

Setting up local version control in under 5 minutes

So you want to make a quick-and-dirty application to test something? And you start and hack away? And it starts looking fairly good? And suddenly it stops working? Here’s a pro-tip: CTRL-Z. For the more down-to-earth devs: use a source control system. I find myself using it more and more, even for mini-projects: from small […]

AppHarbor, Mercurial (or Git), awesomeness

I just go my AppHarbor build to work, and can definitely recommend it if you have a project of your own. It’s a builder server and hosting in one. I switched to Mercurial for this, but it will work with Git also. I just wanted to be able to tell the girls in the club […]

Trunk based development

Update: This is an old article that helped us at the time, using a centralized version control system (Subversion). We created our own branching strategy, and in essence, came up with trunk based development before we really knew it already existed. For the record: I would heavily advise against developing your own branching strategy. The […]

Git, TortoiseGit and (Putty) SSH keys for Windows

Okay, I finally got Git to work. Here’s the necessary steps, after having installed msysgit and TortoiseGit. First, create the local repository. You’ll get a notification that an empty repository was created. You can now use the repository to track your changes. But of course, you want to push this stuff to a server, as […]

Git and SSH keys

Git can be quite confusing in the beginning, especially coming from a subversion background. But once you’ve got it running, you realize it’s quite easy:install msysgitoptionally install something like TortoiseGitnow you need to create an SSH key, which is explained on the TortoiseGit site for Linux, but for Windows, it’s a little harder:open command prompt […]