Category: Git

Git

Fun Tool To Learn More About Git Branching And Merging

Want to learn more about how to work with branches in git? Confused about what “git rebase” does? By way of a post on Google+ I learned about this great tutorial site at: http://pcottle.github.io/learnGitBranching/

Learn git branching

You can step through a whole series of guided lessons (type “levels”) that walk you through all different aspects of using git – or you can type “sandbox” and go into a private area to play. All from the comfort of your own web browser.

More information (and the source code) can be found on Github at https://github.com/pcottle/learnGitBranching. There is a neat aspect of this where people can (and I guess have) contribute additional tutorial levels.

Very cool tool!

Use Google+? Join the Github and Git Communities

Github community on Google+Are you a Google+ use who is also interested in the git version control system and the Github hosting service?  If so, there are two of the new “communities” in Google+ that you may find of interest:

In the short time communities have been around on Google+, I’ve already found both of these communities to have very useful information and links in them related to Git and Github.  Well worth checking out and joining if you are a regular Google+ user.

And if you are a Google+ user, why not connect with me there?

P.S. We can also connect on Github.

Contrasting Mercurial vs Git: Two Opposing Blog Posts

GitvsmercurialWhich should you use for a distributed version control system (DVCS) – git or mercurial? That was the question taken up recently by two opposing blog posts on Atlassian’s blog:

Admittedly this is a bit of a “religious” issue with adherents on either side being extremely passionate about the topic. In my own case, my writing here (as well as my Github account) definitely show that I fall down on the side of git… but I’m also always interested to learning more about the various tools.

The two blog posts are written by passionate advocates for each tool and so naturally have that flavor. Regardless, they make for interesting reading. I don’t see myself switching to Mercurial any time soon… but it’s interesting to see the pros and cons of each. We still don’t have the “perfect” tool… but will we ever?

Given that I started working with version control systems back when RCS was the only option I had… and then CVS was a huge step forward… and then SVN was viewed as excellent… all I can say is that we’ve come a loooonnngg way and it’s greatto see both git and mercurial out there.

P.S. I should note that both of these articles are part of Atlassian’s “DVCS Guide” that has some other useful pieces about why distributed version control systems are worth investigating and using.

O’Reilly Offers 50% Off On Git Ebook And Videos Through Feb 8th

Being a huge fan of the git version control system, I was pleased to see that O’Reilly is offering 50% off on their git-related videos and ebook. I haven’t seen the videos, but the “Version Control with Git” book is quite good. More info on O’Reilly’s site:

Oreilly git offer

P.S. I have no financial motivation to post this info, i.e. I am not being compensated through any kind of referral links or anything else. I just think this is an interesting offer to folks interested in learning more about git.

New Github for Mac 1.1 Release Nov 23rd…

GitHubforMac

I just noticed yesterday that a new version of Github for Mac was released on November 23rd. The blog post about the 1.1 release highlights the major changes as:

  • The “Changes” view has been completely redesigned.
  • The ability from the GUI to commit individual lines of code.
  • A “Commit & Sync” feature so that you have just one step to get your code on Github (or wherever it is hosted).
  • Full screen support for Lion.
  • Tracking repositories if they are moved or renamed.

I’ve gone ahead and downloaded Mac for Github 1.1 and am looking forward to seeing how it works.

P.S. And yes, being perhaps old-skool, I mostly use the command line to work with git. But there are times when a GUI is nice, particularly when looking at changes between versions.

Amusing Video Tutorial: Let’s Suck at Github Together

If you want to learn more about using git and Github, or are a fan/user of git/Github (as I am) and want to pass along a video tutorial for others to see, you may enjoy this episode from Chris Coyier entitled “CSS-Tricks #101: Let’s Suck at GitHub Together“. As you can tell from the title, Chris doesn’t mind poking some fun at his own abilities – and his own aversion to the command-line and preference for GUI utilities.

For me personally, I’m rather “old skool” and typically prefer the command-line, but I appreciate that many people don’t… and I enjoyed Chris’ entertaining episode. Sure, as some commenters noted, there were a few minor inaccuracies/faults… but overall it did the job well in helping introduce people to what git and Github together can do. I can’t embed the video here, but if you click on the image below you’ll be taken to his site where you can view the episode…

Csstricks github video

And if you are over on Github, you can follow me there as github.com/danyork.

Want To Help Guide Git’s Development? Take the 2011 Git Users’s Survey!

Git logoDo you use the git version control system? If so, do you wish it worked a bit differently? Or did you find it hard to use in some way? If you don’t, did you try to start using it and found it difficult to understand?

If you are a git user in any way (or are trying to be), the Git community is LOOKING FOR YOUR INPUT in the Git User’s Survey 2011 at the address:

http://tinyurl.com/GitSurvey2011

As the main page of the Git community wiki asks:

Please devote a few minutes of your time to fill out the simple questionnaire; it’ll help the Git community understand your needs, what you like about Git (and what you don’t), and overall help us improve it.

The survey runs from now through October 3rd and the results will be posted on the Git wiki.

Being a git fan and user I did complete the survey which, true to the notice, did only take a few minutes to complete. As more of a “casual” user of git in that I use it for a variety of projects but don’t live in it as a full-time developer might, I actually found the survey quite educational in that I found names of a whole number of projects I want to explore.

If you do use git and have a few minutes, the folks behind Git would love your input!

Dulwich – a native python way to access Git repositories

Ever wanted to manipulate Git repositories directly in python? Well, okay… I haven’t really myself, but in writing about Google Code’s support for git yesterday, I noticed that they are using Dulwich, a native python implementation of git. Rather than wrapping command-line git with python scripts, Dulwich is a python module giving you direct access to a git repository. As shown in the Dulwich tutorial, creating a new repo is simply this:

>>> from dulwich.repo import Repo
>>> from os import mkdir
>>> mkdir("myrepo")
>>> repo = Repo.init("myrepo")
>>> repo
<Repo at 'myrepo'>

Once a repo is created (or you connect to an existing repo), you can do what you would do with git at the command line: adding files to the repo, committing files, and changing files.

While I don’t know that I personally will use this… it’s very cool that Dulwich is out there for python programmers who want to interact with git repos. Very cool to see!

Google Code Now Supports Git for Hosted Projects

Being a big fan of Git for version control, I was very pleased to see the announcement last week that projects hosted at Google Code can now use git in addition to subversion and mercurial (see also Google Code’s GitFAQ). I had looked at hosting projects on Google Code in the past, but chose not to specifically because git was not an option. While I personally am quite happy using Github for project hosting, it’s always good to see other services supporting git:

Googlecodeandgit

Way to go, Google Code!

Greg Bayer: How to Move Files From One Git Repo To Another While Preserving History

By way of a Hacker News post, I learned of this great post by Greg Bayer:

Moving Files from one Git Repository to Another, Preserving History

I’ve actually had a couple of cases where I’ve wanted to move some files and keep the history. I couldn’t easily figure it out and opted to just copy the files into the new repo and lose the history. This looks like a workable solution instead. Thanks to Greg Bayer for writing it up.

P.S. a comment to the HN post also mentions this “git-subtree” tool, which does look interesting.