Blog Archives

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

Advertisements
The Bright Side of Java & Linux

Yet another Java blog

mysoftwarequality

Bringing empathy into knowledge workers life

%d bloggers like this: