GIT: work as a professional Dev

For example: we have 2 branches:
master
thuan
// from master
git checkout master
git pull (to get latest version)
//step1
// to work with branch “thuan”
git checkout thuan
git merge master //(to update latest from master)
//modified, update, create new scripts, …
git add file1 file1 file2  //(or git rm file1 file2)
git commit -m”Create new scripts file1, file2″
git push origin thuan
// Now your work finished, then you want to push the changes to master branch
//step2
git checkout master
git pull
git merge thuan
// if there is any conflict, please resolve it first
// then add the changes again (if there is conflict)
git add file1 file2
git commit -m”commit the changes”
git push origin master
//Done
// now you wanna changes somethings again, do the step again.

Advertisements

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