sherman
sherman

Reputation: 45

How do I continue my changes based on new changes on master

In Gitlab I was working in a branch and in the middle of my process my leader told me to pull new changes and I committed and push my changes(without merge request) and then checkout to master branch , after pulling his changes, now how can I continue my previous branch based on new changes?

Upvotes: 1

Views: 57

Answers (3)

rahul mishra
rahul mishra

Reputation: 1470

  1. git checkout master
  2. git pull origin master

you already performed first two steps to bring master changes.

  1. git checkout your_branch
  2. git rebase master # to bring new master changes to your branch.

Now continue working on your branch.

Let me know if it resolved your problem

If the conflict occurs then resolved conflicts and continue using git rebase --continue

NOTE: if major conflicts occur then abort it using git rebase --abort and told to your lead about this.

Thanks!

Upvotes: 1

aldidoanta
aldidoanta

Reputation: 16

There are two approaches:

  1. You merge the master branch to your current branch, or
  2. You create a merge request to master branch and wait for your project leader to approve it.

After all it depends on your team's workflow.

Just let me know if you need visualization or git command line, I'll update my answer.

Upvotes: 0

user8186436
user8186436

Reputation:

You need to update your branch with master.

If your new changes doesn't make any conflict, you are good to go. Otherwise you need to choose which one you are going to continue.

Upvotes: 0

Related Questions