You are only browsing one thread in the discussion! All comments are available on the post page.

Return

mokazemi ,
@mokazemi@discuss.tchncs.de avatar

I guess you should rebase or merge the Master branch into your branch and then push again:


<span style="color:#323232;">git checkout master
</span><span style="color:#323232;">git pull origin master
</span><span style="color:#323232;">git checkout yourbranch
</span><span style="color:#323232;">git rebase master
</span><span style="color:#323232;">git push -f origin yourbranch 
</span>

But if you got error since that new commit has conflict with your chances:


<span style="color:#323232;">git merge master
</span><span style="color:#323232;">git push origin yourbranch 
</span>
glue_snorter ,

No! Bad dev! No biscuit!

Never merge master into a feature branch. It’s called a “wrong-way” merge and it makes the history fucking awful.

You shit in the face of project maintainers when you do this.

You may not care, in fact many don’t. Also people buy timeshares, read celebrity gossip magazines, and vote for scumbags. They are fucking idiots who don’t know what they are doing. So are people who leave wrong-way merges in shared history.

In fact, wrong-way mergers are worse, because you can’t just ignore them - git blame rubs your face in their shit, so they shit in your face forever.

Just don’t fucking do it, OK? Or I will hit you in the throat with a cricket bat soaked in wasps. As a first warning.

mokazemi ,
@mokazemi@discuss.tchncs.de avatar

Sure I promise not to do it anymore. Calm down. Take a deep breath at first! :)) Could you explain the right way to do it? I’m not expert in using git. Explain the correct way to deal with the situation.

Fal ,
@Fal@yiffit.net avatar

Your first way was the right way, rebasing

mokazemi ,
@mokazemi@discuss.tchncs.de avatar

Mmm… And what if it had conflict and I got error?

louis_sch ,

Resolve those conflicts !

bert ,

Not an issue if you’re squashing commits before merging into master though, right?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • All magazines