Skip to content
marrabld edited this page Aug 6, 2012 · 1 revision

Install Git on Ubuntu 12.04

    sudo apt-get install git-core

CATAMI git-hub site: CATAMI Git

Cloning a repo with ssh

Pulls the version information as well. Requires you to have uploaded your public ssh key in github

    git clone git@github.com:threehundred/catami.git <local/folder>

Staging a file

    git add <file> 

Ignoring files

create .gitignore file

    *.a

will ignore all files with .a extension

Changing last commit

This will create a single commit including your changes

    git commit --amend

Add a remote repository to Git

    git remote add <short name> <url>

Push to repository

    git push <remote name> <branch>

Create a branch

NOTE: This does not switch to the new branch

    git branch <branch name>

Switch to a branch

    git checkout <branch name>

Create a branch and checkout in one command

    git checkout -b <branch name>

Merge branches

    git checkout <branch to be merged in to>
    git merge <branch with changes>
Clone this wiki locally