neverfox
neverfox

Reputation: 7010

Git: set master identical to develop

I cannot get my master and develop branches to be identical. I want my master branch to look exactly like my develop branch as it currently exists, but somehow despite file name changes and deletion of directories in develop, those filenames and directories still exist in master no matter a merge, which just tells me that everything is up to date so I'm stuck as to how to get master to change without doing it manually, which is sure to be error prone.

Upvotes: 3

Views: 2459

Answers (1)

1615903
1615903

Reputation: 34741

What you can do here is a git reset so that your master branch points at the same location as the develop branch. Note that you will loose everything on master that is not in develop.

git checkout master
git reset --hard <sha1 of develop>

After that, master and develop both point to the same commit.

Upvotes: 4

Related Questions