Skip to content
Sun Seng David TAN edited this page Apr 4, 2014 · 3 revisions

Git daily usage. Working with a local master branch.

Work with master

The simplest way is to work always with master:

git checkout master

Commit

git add somefiles
git commit -m "comment"

Update changes from origin remote repository

if you have local changes before doing anything save your work with:

git stash

Then

git pull --rebase

It will fetch the new changeset from origin/master AND rebase your changeset from the current local master branch on top of it. you may have some conflict to resolve.

git push origin master

To push master.

Clone this wiki locally