about synchronization of remote forked master, local master & local branches
vikrant8051 <vikrant8051@...>
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 !! |
|
Li, Jun R
Let’s say the PR’s number is $PR, run the follow commands:
From: <devel@...> on behalf of vikrant8051 <vikrant8051@...>
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 !!
|
|
Yasushi SHOJI
Hi,
# I don't think it's a good idea to multi-post. # make sure not to do so next time. On Thu, Aug 16, 2018 at 9:43 PM, vikrant8051 <vikrant8051@...> wrote: Then how to properly sync$ git fetch --all $ git pull $YOUR_REMOTE origin/master:master 2) local master branch$ git fetch --all $ git checkout master $ git merge origin/master or, if you haven't fetched. $ git checkout master $ git pull or, if you are sure you don't have anything on your local master, there are other ways: https://stackoverflow.com/q/5471174/640650 3) local branch (which is actually responsible to fix issues)$ git checkout $YOUR_FIX_BRANCH $ git rebase master and make sure to test your branch again. periodically without disturbing own commits architecture?If you have some modification which is not commited yet. Do $ git stash then $ git checkout $WHATEVER There is "auto stash" config if you prefer. -- yashi |
|
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 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:
|
|