$blog++

Version-control Archives

git refusing to merge unrelated histories

Mar/12/2019 1 min read by Marco Monteiro

One of the things that happens to me a lot is when I start a new project on my computer that someone else started on our main repo is this error saying that I'm trying to merge unrelated histories.

This happens mostly because someone on the other side already started the master and develop branch and made some commits to it.

Read more

git commander another great command line interface tool

Jul/18/2018 1 min read by Marco Monteiro

This is a git tool that gives more friendly way to navigate your git logs, commit or even diff files. Personally I use git most times inside Sublime Text 3. However its always nice to have a tool like this at hand.

Read more

Git extras

Feb/10/2014 3 min read by Marco Monteiro

I'm a heavy git user, hence I'm always trying to improve my workflow while using it. I normally have 3 ways of using git. I could use a gui client (sourcetree), normally I do this when I'm preparing a new release.

On my daily code day I would use git inside Sublime Text 2. That way I don't need to constantly change between my text editor of choice and a git gui or the terminal. However, from time to time, I use just the terminal. That happens for two reasons, one I could be using git remotely, or I could be doing something more difficult that couldn't be resolved inside sourcetree or Sublime Text.

Read more

Atomic commits

Nov/04/2013 3 min read by Marco Monteiro

I'm sure this happened to you before, more than one time actually. You have a big file, you changed lots of stuff in it, but those changes are not really related. One may be related to one class and the other to something completely different. Normally you should avoid that, your commits should always be specific to one task, feature or bug. If you do a small search about how to commit better you'll see that even the commit messages should have this notion.

Read more

Useful tips if you're starting with Git

Oct/30/2013 3 min read by Marco Monteiro

When I started using Git I wasn't doing any version control. I was just working on my projects and I just didn't see any use to it. I wasn't seeing the long run. Everything seemed like too much work — Branching, staging, stashing, committing — I was confused. But then Git was kind forced on me, since I wanted to contribute to open source projects and almost all of them were (and still are thankfully) using Git I had to learn how to use it. This is what I learned from that process.

Read more