2010/5/1 Ben Boeckel <[email protected]>: > Alexander Neundorf <[email protected]> wrote: >> Hi, >> >> I tried to push a commit to master, but this failed because git complained >> that the patch adds a trailing whitespace in one line. >> So I removed this whitespace and committed this. >> But git still doesn't push, I guess because the commit which adds the >> whitespace is still there: >> > <snip> >> >> What should I do ? >> Get a fresh clone, apply the patch, remove the trailing whitespace, commit, >> then push ? >> (would be quite a lot of work for removing one space...)
I read this too fast, this is near to my solution so no so useful. > Hi, > > What I would do in this case is an interactive rebase. > > git rebase -i origin/master > > This allows you to reorder commits, reword commit messages, edit > commits, and squash commits together. To fix this, take the commit which > fixes the trailing whitespace and put its line below the one which added > it. Change its command to 'fixup' (1.7 or later, 'squash' is available > as well but involves manual commit message editing) and the save the > file and exit your editor. Git will then replay your commits and handle > your commands. Hope this helps. Very interesting, I'll try that next time. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ cmake-developers mailing list [email protected] http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
