0

Suppose I have performed the following steps (in a git repository);

  • make changes on a branch, commit these changes
  • create new branch and move there,
  • push these changes to the new branch and submit and merge request into the previous branch
  • checkout the original branch and find that this committed change is still there (at least locally)

While waiting for the merge request to be accepted, I would like to continue working on further tasks, but am concerned that working on top of this original change could cause conflict later.

Question, is it safe/recommended that I revert these changes considering that the, eventually, accepted merge request will include them?

What is an efficient practise for completing multiple disjoint tasks intended to be merged to the same branch eventually?

BenSmith
  • 163
  • 1
  • 9
  • 1
    You have your changes in the feature branch. You can safely reset and revert your changes on master. – ckruczek Jan 06 '17 at 11:44
  • 1
    this happens to me quite often, and i just `git reset --hard origin/master` in order to make the local modifications on master go away. use git-reflog to retain changes in case you have reset the wrong branch locally. – phoet Jan 06 '17 at 13:05

0 Answers0