Thursday, August 13, 2015

Git Made Easy - Part 2

Approach #2

$ git checkout main_dev
$ git pull
 src/test/resources/testdata.json                   |   9 ++
 18 files changed, 454 insertions(+), 338 deletions(-)
$ git checkout -b task#r1001#ext
$ git checkout task#r1001
$ git log
commit 6e86b7b50d10623eec33f49917a7c3c50a4cff2a
Author: Rizvi <abu.rizvi@gmail.com>
Date:   Wed Aug 5 14:49:04 2015 +0600

    RZ# Facility Portal fix and new Test Cases.
$ git checkout task#r1001#ext
$ git cherry-pick 6e86b7b50d10623eec33f49917a7c3c50a4cff2a
$ git push origin task#r1001#ext:main_dev
$ git checkout main_dev
$ git pull
 src/test/resources/testdata.json                   |  10 +-
 3 files changed, 528 insertions(+), 10 deletions(-)
$ git checkout -b task#r1002

From first pull, if we get any kind of changes, insertions or deletions, we have to follow above rule.
we have to make another branch named by task#r1001#ext which containing everyone's updated code.

Here task#r1001 is containing only my updates. So I need to take the log file to get my commit number. Then I go to branch  task#r1001#ext  which is updated except my new commit code. So, I want to cherry-pick from this branch giving my commit number.

Then I will push the updated to main_dev. Then I will pull so that I can get my all changes here. Here after I will make new branch to work further.

No comments:

Post a Comment