Skip to main content
added 4 characters in body
Source Link
Martin Devillers
  • 18k
  • 6
  • 49
  • 92

I am unfamiliar using GitBash and I am adding an answer using TortoiseGit (GUI for newbees) here for those devs using Windows:

Force re-basing remote branch with local branch using TortoiseGitForce re-basing remote branch with local branch using TortoiseGit

Like many mentioned above, do this if only with your "private" repo branch and that means no one will ever throw a chair at you for re-basing the remote "develop" or "feature" branch with your local copy. The other devs who've committed and pushed their week's worth (or more) of work will be ERASED from the branch's history (log).

There will be no way to recover them - of course your co-developers will still have their changes on theirs as their PULL will most likely throw an error as they will be way way ahead of the branch current history or latest commits vs. theirs. Good thing Git is a distributed versioning system.

So, be careful with this power to reverting a remote branch. You are hereby warned. ;)

I am unfamiliar using GitBash and I am adding an answer using TortoiseGit (GUI for newbees) here for those devs using Windows:

Force re-basing remote branch with local branch using TortoiseGit

Like many mentioned above, do this if only with your "private" repo branch and that means no one will ever throw a chair at you for re-basing the remote "develop" or "feature" branch with your local copy. The other devs who've committed and pushed their week's worth (or more) of work will be ERASED from the branch's history (log).

There will be no way to recover them - of course your co-developers will still have their changes on theirs as their PULL will most likely throw an error as they will be way way ahead of the branch current history or latest commits vs. theirs. Good thing Git is a distributed versioning system.

So, be careful with this power to reverting a remote branch. You are hereby warned. ;)

I am unfamiliar using GitBash and I am adding an answer using TortoiseGit (GUI for newbees) here for those devs using Windows:

Force re-basing remote branch with local branch using TortoiseGit

Like many mentioned above, do this if only with your "private" repo branch and that means no one will ever throw a chair at you for re-basing the remote "develop" or "feature" branch with your local copy. The other devs who've committed and pushed their week's worth (or more) of work will be ERASED from the branch's history (log).

There will be no way to recover them - of course your co-developers will still have their changes on theirs as their PULL will most likely throw an error as they will be way way ahead of the branch current history or latest commits vs. theirs. Good thing Git is a distributed versioning system.

So, be careful with this power to reverting a remote branch. You are hereby warned. ;)

Source Link

I am unfamiliar using GitBash and I am adding an answer using TortoiseGit (GUI for newbees) here for those devs using Windows:

Force re-basing remote branch with local branch using TortoiseGit

Like many mentioned above, do this if only with your "private" repo branch and that means no one will ever throw a chair at you for re-basing the remote "develop" or "feature" branch with your local copy. The other devs who've committed and pushed their week's worth (or more) of work will be ERASED from the branch's history (log).

There will be no way to recover them - of course your co-developers will still have their changes on theirs as their PULL will most likely throw an error as they will be way way ahead of the branch current history or latest commits vs. theirs. Good thing Git is a distributed versioning system.

So, be careful with this power to reverting a remote branch. You are hereby warned. ;)