One way is to forcibly reset your branch B:
git checkout B; git reset --hard A
or, if you want to make your changes as if you branched off from A right
git checkout B; git rebase A
this will replay your changes in B to the current tip of A.
Be aware, though, that both of these are considered a no-go if you have
already pushed B to a "blessed" repository. In that case, you should
instead create a new branch.
On 9 Sep 2015 02:53, "Roger Dunn" <rogerfd...@gmail.com> wrote:
> I've used git for eons, but always got sideways on this.
> Create branch B from parent A
> Perform work on Branch B.
> Other engineers commit changes directly into A.
> ----> I now want to toss all changes I made in B, and get an exact
> snapshot of what is in A (as if I just created a new branch, but I want to
> re-use the existing name)
> I previously would just create a new branch and walk away from the old
> one, which is probably ok but would rather do this right in order to keep
> using the same branch name.
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.