0

Honesty speaking i tried so hard to resolve my issue by googling . I even found some of the fantastic resources like (1) (2) but still i don't understood.

Initially,my problem was branch conflicting.I created one feature in branch called user-creation .And, after then i realized that there was one major bug in my master branch . So i check checkout and corrected it. Then i started working on my user-creation branch and implemented the desire feature and fixed the old bug which i already fixed in my master branch .

Due to this on merging,some conflict arose. Because git changed hundreds of file and put this <<<<<<< HEAD . I though it would be good if delete all my files except .gitconfig , .git/ .^g and merge my existing user-creation branch with master one.

No matter how much i tried to

git reset --hard origin/master

i didn't came to my successful result .

If someone please tell me

  1. How to copy all folders of user-creation branch in master branch in best possible way and easy way.
  2. Why conflict arises . I didn't worked with team . I took all precautions. do my computer hacked ? or working in multiple tab-terminal may cause problem like this .
Community
  • 1
  • 1
Paritosh Piplewar
  • 7,982
  • 5
  • 26
  • 41

1 Answers1

0

You should rebase your feature branch on top of master: that way, you keep all the fixes from master while applying the work you did on feature again.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250