Cloning a GIT repo with many branches

If you clone a repository, lets say the jQuery-Easy-Confirm-Dialog-plugin
on github, you will only get the master branch. If you are going to do
some development and want to follow the correct branching model you
would also need the develop branch.

Start by cloning the repo:

 
$ git clone git://github.com/wiggin/jQuery-Confirm-Dialog-plugin.git 
Initialized empty Git repository in 
/home/jonatan/Documents/Projects/jQuery-Confirm-Dialog-plugin/.git/ 
remote: Counting objects: 15, done. 
Receiving objects: 100% (15/15), done. 6% (1/15) 
Resolving deltas: 100% (4/4), done. 
objects: 100% (13/13), done. 
remote: Total 15 (delta 4), reused 0 (delta 0) 

To see all branches, both local and remote, use the branch command:

 
$ git branch -a 
* master 
 remotes/origin/HEAD -> origin/master 
 remotes/origin/develop 
 remotes/origin/master 

Then you use the checkout command to create a local branch that is
tracked to the remote branch of the same name:

 
$git checkout -b develop origin/develop 
Branch develop set up to track remote branch develop from origin. 
Switched to a new branch 'develop' 

If you check what local branches you have you now can see that you created and
switched to develop:

 
$ git branch 
* develop 
 master 

Writing in Emacs

Now-a-days I am doing a lot of writing in Emacs. This is overall a pleasant experience, especially when enabling automatic line-breaks.

 
(setq text-mode-hook 
      '(lambda nil 
(setq fill-column 80) 
(auto-fill-mode 1))) 

Everything is good and well until you go in an change something in the middle of a paragraph. This results in un-even, ugly text. But it would't be Emacs if it did not have an obscure key combination to solve it all: Meta-q.