Topic “git”

Improved importing to bitbucket

Easier method using git commands

Earlier, I wrote about a way to import an exisiting git project into bitbucket. I've since discovered a much easier way to do this using git's own commands. Instead of having to use git's daemon mode and have bitbucket import your repository, you should setup a new bitbucket repository and push to it. Assume you have a new repository, do the following two commands at your terminal. The key is the -u switch, which sets the master branch to track the remote repository.

Tags:

Importing to BitBucket

When bitbucket added git to their code hosting service, I signed up to try out the service. Primarily since they offer unlimited free private repositories, which is perfect for one-coder projects like this blog. Each repository also gets a wiki and an issue tracker.

Creating an account was straight forward, I then had to import my self-hosted git repository to bitbucket. This wasn't too difficult, after opening port 9418, which is used by the git protocol, I did the following.

1. Let git know that I wanted to export my repository

Working with git branches

I can't seem to remember the specicfic magic git switches when pushing and pulling branches between different git repositories, so I am writing it down here.

1. Create your local branch for development

git checkout -b my-branch

2. Push local branch to remote server & track it.

git push -u origin my-branch

3. Checkout and track a remote branch

git fetch
git checkout -b my-branch origin/my-branch

Alternatively:

git pull
git checkout -b my-branch origin/my-branch
Tags:

Use git and subversion together.

Hybrid approach may ease transition

Are you still using SVN but have some users clamoring to try out git? Kris.me.uk details all the commands and workflow to make it work.  While I've known that git had some svn integration available, I prefered to switch cold-turkey to git.  You can read the reasons I switched to git.

Why switch to git?

I've ditched subversion, and you might want to do the same.

Get ready to clone.
Clone ... What could possibly go wrong?

If you're a coder, you've already heard about distributed version control systems (DVCS) and git in particular. I was content, almost complacent, in my usage of subversion to manage my source code, both for personal projects and at work.

Git PHP lint pre-commit hook

This post describes a small tweak to make to php lint checking via a git pre-commit hook.

Using git hooks to check syntax errors - Tim Akinbo’s Blog

Tags: ,

Git & Drupal Deployment

Tags: ,

Using git to deploy website code

Jow Maller outlines a straightforward system for using git to manage code from development copies and branches through production. The fact that deployment to live is automated, but I'd be worried about broken or unreviewed code getting deployed unintentionally. I think the best way to prevent that is to have live be its own branch, and then pushing changes to the live branch once they've been reviewed, tested, and blessed.

Recent Comments

Subscribe by Email

Enter your email address:

Delivered by FeedBurner