Reputation: 90
I have a project with a master branch and a second_branch. The data in the two branches is different and I want to copy the data from the master branch into second_branch and then update second_branch on GitHub. How can I do that?
The status of second_branch is:
This branch is 3 commits ahead, 1 commit behind master
Upvotes: 0
Views: 1034
Reputation: 225075
You can use git reset
to point a branch to a different commit. So, on second_branch
,
git reset --hard master
Then git push -f
to update GitHub.
Upvotes: 2