Re: about synchronization of remote forked master, local master & local branches


vikrant8051 <vikrant8051@...>
 

Hi Li,

I tried your trick. But it was not fulfill my requirements.

Following is my way ....... It is lengthy but works !!

(PART-A)

// This is to sync forked local master (repo on PC/Laptop) with Zephyr Master

cd /home/user_name/

git clone https://github.com/developer_user_name/zephyr.git

cd zephyr

git remote add upstream https://github.com/zephyrproject-rtos/zephyr.git

git fetch upstream

git pull upstream master

// This is to sync GitHub forked master with Zephyr master

git push -f origin master

---------------------------------------------------------------------------------------------------------------------------------

(PART-B)

// This is to sync local branch with master

1)

cd /home/user_name/Desktop

git clone -b fix_branch https://github.com/developer_user_name/zephyr.git

cd zephyr

git pull --all

git checkout master

git pull

git checkout -

git rebase master

---------------------------------------------------------------------------------------------------------------------------------

OR

2)
(After following PART-A instructions)

cd /home/user_name/zephyr

git pull --all

git checkout fix_branch

git rebase master


I'm looking for even better sequence of instructions than this.

Thank You !!

On Thu, Aug 16, 2018 at 10:09 PM, Li, Jun R <jun.r.li@...> wrote:

Let’s say the PR’s number is $PR, run the follow commands:

 

  1. git pull origin master
  2. git fetch origin +refs/pull/$PR/merge
  3. git checkout FETCH_HEAD -b my_branch_with_fix

 

 

 

From: <devel@...> on behalf of vikrant8051 <vikrant8051@...>
Date: Thursday, August 16, 2018 at 05:43
To: "devel@..." <devel@...>, "users@..." <users@...>
Subject: [Zephyr-devel] about synchronization of remote forked master, local master & local branches

 

Hi,

 

Assume a person create one PR (to solve already present issues) & it take some time to get approval from reviewers.

 

Meanwhile Zephyr master get upgrad as usual.

 

Then how to properly sync

 

1) forked Zephyr master branch on GitHub

2) local master branch

3) local branch (which is actually responsible to fix issues)

 

periodically without disturbing own commits architecture?

 

Thank You !!

 


Join devel@lists.zephyrproject.org to automatically receive all group messages.