0

I've added several consecutive incremental changes in my Git project that all share the same description (I.e. a false bug fix, followed by bug refix commit).

Is there any prompt method to select all those change into a single commit message after they were already (before or after they were pushed to central repository) ?

this way, I shell avoid multiple records on my project git history log, that all linked to the same issue. Instead, I'll get a single a single commit that contain all those incremental changes.

I also like to know if this can be done svn tool.

thanks

Zohar81
  • 4,554
  • 5
  • 29
  • 82
  • Are you trying to squash the commits into one? http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git – peterhogg Sep 14 '16 at 14:30

1 Answers1

0

Please take a look at this question: How to modify existing, unpushed commits?

For git, you can just rebase. check with git log the commits. Let 'abdc237ze782he32uhe' be your last commit, you do not want to be part of this "gathering". Then command: git rebase abcd -i

then you got a list:

  • pick iehiuehd9 bugfix
  • pick uiz98z445 bugfix 2
  • pick 879834hu4 bugfix3

the last one is your last commit. Assuming you want to gather all to one commit, change as follows

  • pick iehiuehd9 bugfix
  • s uiz98z445 bugfix 2
  • s 879834hu4 bugfix3

then save and follow the instructions.

result: you will have just one commit ( in my example iehiuehd9 ), containing all your changes of all 's' commits.

Community
  • 1
  • 1
MHensel
  • 11
  • 2