-1

I have the following branches in my local git:

-master
-develop
-test

I am adding a new feature, using the test branch, which was created months ago. I need to update its content (replace everything) with the develop branch.

How can I do that?

Raul
  • 2,673
  • 1
  • 15
  • 52

2 Answers2

2

In one go, recreate test branch from where dev is, and check it out :

git checkout -B test develop

(doc for the -B option)

Romain Valeri
  • 19,645
  • 3
  • 36
  • 61
1

Go to develop branch

git checkout develop

Remove the test branch

git branch -d test

Create a new branch called test

git checkout -b test

The new branch test will contain all content of develop branch.