0

I have made some changes through repo at Bitbucket. you can see the changes made as below

What I want to do is roll back some of those changes and keep the rest.

In the future I will like to add and commit those

What command can I use to do such?

For instance if I was to roll back to the last one 0416f69, what command can I execute ? Can it be done through tortoise git

Later if I were to readd the changes back, what command can I use?

enter image description here

Hello Universe
  • 3,248
  • 7
  • 50
  • 86

1 Answers1

1

There are few options:

  1. Do a git patch from your changes and later apply them.
  2. Checkout the lats required commit (Detached head) and then create a new branch form the point that you wish to keep. git checkout <commit id>
  3. Do a git revert on the unwanted commits
  4. Backup your current work to a new branch and later on do a cherry pick on the required commits.

Good luck and hope it was helpful for you.

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • this http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide/323898#323898 is good explanation – Hello Universe Feb 02 '15 at 04:03