I have a project where I have the following commit sequence:
* 800cedc (HEAD, origin/master, origin/HEAD, master) Commit 6 * 1d51716 Commit 5 * 5232f4b Commit 4 * 01838a5 Commit 3 * 3aeb34d Commit 2 * 9b75b72 Commit 1 For development reasons, what I need to do is the following: 1. Go to Commit 5. 2. Make some small changes. 3. Publish the changes to production. 4. Add the changes to the the commits.
The problem comes when I see that the file that I have changed, it's also changed in Commit 6.
What can I do to change the file in Commit 5 and merge the changes with commit 6 to keep good track of everything?
Thank you!!
git soft reset5232f4b), make a new and improved variant of commit 5 (the original commit will still be1d51716and you'll have some new big ugly hash ID now), and then copy commit 6 to a new and improved version that won't be800cedc—800cedcwill still be what it is, permanently linked to1d51716. Then you can ask your Git and every other Git (such as the one atorigin) to please stop using800cedcand switch to whatever your last commit is, but there's no guarantee they'll do that.