0

we have a project which many developers working on it . every time I want to develop a feature 1- pull latest changes from remote repo to my local and 2- I create a branch locally and do my changes on it and 3- push the newly created branch to remote repo 4- create a pull request to say some changes to somebody come and review it

and reviewer say to me : you have to make some changes to your branch because you have to consider some guidelines

so I go back to my local rep . meanwhile of developing this feature other developers of team push some changes to Main branch on remote repo

now should I pull them first to my Main branch of local repo to have latest changes and merge Main branch to my local feature branch before working on it or not ?

how is the flow in this situation ?

Masoud Shayan
  • 73
  • 2
  • 7
  • 1
    After completing the changes in local, you need to pull the changes(called merging/rebasing) from the `main` branch. If there are any merge conflicts, resolve them and then push it to remote. – Saravanakrishnan Pk Aug 22 '21 at 06:22

1 Answers1

2

Once your review or comments are been provided. Come back to your local and make a git pull. Assuming that other developers in the team had made their commits and pushed them to the remote repo. Once git pull is performed you could see the new changes in the local. Then make sure you're on the feature branch you're working on. Then perform git merge main or git rebase main as per requirement.

Check this when to use rebase or merge

Once merge or rebase is performed make your new changes commit them and push them.

Krithick S
  • 408
  • 3
  • 15