Posts

Showing posts with the label git

GitHub rebasing for the terrified

Image
This is a follow up to my GitHub primer post where I introduced how most of the git concepts. One of the things that catches a lot of people out when the first use git is the idea of rebasing. While you're working on the code base, other people can be working in their own forks, and things can get out of date and this can cause problems when you go to merge your changes back in. So how do you avoid getting into "rebase hell"? This is the stuff I wish I'd properly appreciated before I started, and includes the commands I use to get out of problems. I'm going to repeat the diagram from the previous post because I'm going to refer to some steps in it by number: I'm going to refer to the "main" branch here as it;s now the default that GitHub creates, but many repositories will still be using the old default of "master" used upstream development branch. If your project uses "master", or you're working from an alternate upstrea...

Github primer for the uninitiated

Image
This is a post on how to get to grips with github concepts and repositories which can seem very daunting when you start out. It's a redraft of a blog post which  I initially had on my employer's intranet but haven't posted it publicly until now. It was very popular and people have asked me for copies of it so here it is in the open for everyone to enjoy :-) And if you were wondering why people needed a new source control system in git,  it's down to Linus Torvalds . (NOTE: If you're visiting my post looking for my shell aliases, they're in the ALIASES section near the end of this document) 1. REPOSITORIES, PROJECTS AND PULL REQUESTS The examples in this article will use the public nodejs repository. When working with any codebase there are likely two repositories you will be interested in. One is the main official repository that everyone uses on github (For example  http://github.com/nodejs ) and the second is your own copy of that repository on the github serv...