0

I am new to GIT (Atlassian Stash), Using SourceTree for all the GIT operations. I have merged two branches in GIT using Merge Branch1 into current branch option and committed the changed to the branch.

I have learned about Reset current branch to this commit but it only work of local branch not for remote branch.

I have tried to Reverse commit on the last valid commit but it is showing following error

git -c diff.mnemonicprefix=false -c core.quotepath=false revert --no-edit 7195cc8f27802568becdc09b47effaeb45cc9eeb error: Commit 7195cc8f27802568becdc09b47effaeb45cc9eeb is a merge but no -m option was given. fatal: revert failed

How can i fix the above problem

Mayank
  • 1,351
  • 5
  • 23
  • 42

1 Answers1

0

I suppose that your remote branch is your development branch and that no other developers are working in this branch.

If your branch is a shared branch with other people, please ignore my solution.

If your local branch is up to date, you can use the following Git command to update the remote branch:

cd your_workspace_path
git push origin your_branch_name --force

The --force option will force the update on the remote branch.

Another answer on the same subject: Removing/undoing a merge on Sourcetree

Community
  • 1
  • 1
Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38