I just merged master branch INTO my development branch. Fuuuuuuuck

  • 6
    git reset --hard?
  • 3
    Good moment to learn something! You can Google how to undo things like that. Git can be very forgiving if you know its advanced features.
  • 2
    I feel you, really 😅
  • 3
    But didn't development branch off from master anyway? You would only get changes on master which are not in your branch.

    (Oh, and ... rebasing > merging!)
  • 0
    Good that you are using a VCS. Nothing is lost
  • 0
    @hawkes ok I definitely should learn git properly...
    What is rebasing?😌
  • 1
  • 0
    Ok great example but why is it better?😅
  • 7
    Controlled rebasing makes the repo less cluttered. Google for "gitflow" for a workflow fit for larger projects.

    In short: While you are developing a feature, rebase your branch on master instead of merging to get changes of other devs into your feature branch, when the feature is finished merge the branch back to master.

    When you rebase you also resolve conflicts on a commit-by-commit base instead of resolving one huge conflict.

    If you develop a feature with 7 commits and have 5 merge commits from master to your branch, and you push that stuff to stay in the repository history forever - I don't know who you are, but I will find you, and I will ... force you to learn git!
  • 0
    @hawkes you don't really have to, I want to learn git
    Edit: thank you 😁
  • 0
    Still don't believe hell is real?
  • 1
  • 1
    i don't get the problem. as long as you only merged there shouldn't be any problems with said branch. considering you haven't made changes to the master branch directly in which case i would say that you deserve it
Add Comment