Git for impatients


Clone a project:
git clone git@github.com:nemo83/webservices.git

Commit a change
git commit -am "comment"

Push (to remote) a change
git push

Retrieve changes for the current branch (it’s actually more but you’re impatient!)
git pull --rebase

Create a branch
git branch branch_name

Switch to a branch
git checkout branch_name

Switch and Branch in one go
git checkout -b new_branch_name

Push local branch to remote (after you can use the normal push above)
git push -u origin branch_name

Merge branch into master

git checkout master
git merge branch_name

Remove local reference to deleted branches

git remote prune origin

Remove file from git source control without deleting
git rm --cached file_name

Won’t add more coz it’s just for impatient, if you need more..

git --help

About giannigar

Senior Software Engineer - Groupon - Dublin, Ireland

Posted on March 2, 2014, in Programming and tagged , , , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Bright Side of Java & Linux

Yet another Java blog

mysoftwarequality

Bringing empathy into knowledge workers life

Jess & the City

Cynical ramblings of a Latin girl living in Dublin

%d bloggers like this: