Dogukan Sonmez

Currently in Munich, Germany

Java Groovy Python

No-Sql TDD Scrum

Django Shell Cloud

May 09 2012

Git how to series

Git is a distributed revision control system with an emphasis on speed. It's going to become indtustry standart. In this post I emphasized possible most used git commands while working on a project

Start from getting code on your local machine.

    git clone remote-repository-url
        

See the state of your project

    git status

list branches

    git branch -a

Create new local branch

    git branch new_branchName
    or
    git checkout -b new_branchName

Swithc master branch to local branch

    git chekcout new_branchName

Commit your changes

    git commit -m "Comment about your commit"

Push your local branch to remote repository

    git push origin new_branchName

Push your commit to remote branch

    git push

Merge with master branch

    git merge master
    or to merge another branch
    git merge branch_name

Checkout to master

    git checkout master

Get chenges from origin

    git pull