$blog++

Useful tips if you're starting with Git

October 30, 2013 Written 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.

Commit yourself to using Git

Really, don’t give up. It’s going to hurt. Your not going to like it at first. But believe me when I say that in a matter of days, you’ll love it. You must avoid exceptions like “I’m just doing this static html thing, why do I need Git for?”. That is the worst thing you can do.

Do your homework

Read a bit, prepared yourself. You’re going to need a little know how before you start. You don’t need to read a book on the subject, but it’s good to know the basics.

  • How to start a repository?
  • How to commit?
  • How to track new files?
  • How to push and pull from remotes?

Simple things that you should take a look first.

Don’t overdo

Start with something simple, don’t try to use concepts like Git-Flow at first. Find your own workflow. When you’re comfortable with that, then you can do some research on how to do things from there on. I find this one the easiest one when you’re starting.

Branching is awesome

Your first impulse will be to stay on the same branch and just work there. Don’t do that, learn the power of branching and you’ll see that is worth it.

To use a Git GUI or not to use a Git GUI?

I’m not against it, if you’re not comfortable using the terminal, you should use a good Git GUI. As long you’re using Git and are versioning your code the world is a better place. Personally I use this one from time to time SourceTree.

That’s it, if you follow this small set of tips you’ll be up and ready in no time.


x

Like it? Tweet it.

"Useful tips if you're starting with Git" via @marcogmonteiro