Yes, what Matthew said below is the way to go - you don't have to throw everything away and start over from scratch -- though you will need to start a new, clean branch from master and "construct and maintain" it properly as Matthew outlines below.

It is important to rebase from time to time as you develop, since as you've seen, the upstream branch (master in this case) is likely to diverge while you work on your stuff.

It is definitely a good idea, if not a requirement, to rebase (and of course fix any conflicts) before preparing a patch or patch set for submission.

This is common git work flow, so it's worth learning how all this works.

-jon

On 07/30/2018 09:04 PM, Matthew R. Trower wrote:
Chase via cdesktopenv-devel <cdesktopenv-devel@lists.sourceforge.net>
writes:

To be honest, I don't know how I would go about doing this, help would
be appreciated. Is it at least pheasable to revert the previous
commits and apply this one? I put a lot of work into it. My git
workflow consists of master and then a custom branch where I reverted
the previous commits and patched the software.

That sounds about right.  I assume by revert, you mean that you used
`git revert` to cancel out the commits which removed the component to
begin with.  So:

* `git checkout -b dtudcfonted`
* `git revert <commit>...`
* Make some commits fixing up the software
* `git rebase master`

You'll need to rebase your branch on master at the end to make sure your
patch is applied to the latest code.  I believe Jon wants this fully
fixed up before he will merge it.  Him and I discussed these
requirements in a previous thread on this list.  As this may take some
time, you may want to periodically rebase to keep the branch in sync,
rather than doing one big rebase at the end.

When you finally do submit, you need to submit *all* of the patches on
your branch - including the initial reverting commits.  This could take
the form of several patches in one E-Mail, or one big squashed patch.


Does this clear things up for you?


-mrt


--
Jon Trulson

"Fire all weapons and open a hailing frequency for my victory yodle."

                              - Zapp Brannigan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to