Hi guys - while I mostly get along with Iceberg and can do common stuff - there are still a few things that I'm not sure on the best way to work.
A recent one, was that I created a branch for an experiment - decided not to use and then went back to master to try again. However if I want to cherry pick code (particularly a few methods) - is there nothing I can use to do this easily? I can browse the branch in the repo explorer and see diffs of methods to master - but why can't I load any of those methods (or am I missing something obvious here?)
This seems to be a feature that was not migrated in the iceberg-to-spec2 migration.
Would you mind opening an issue?
The other item that still confuses me today - how can I easily revert back to previous point in time, essentially undo work I've commited and possible pushed to my git repo. I also struggle with this one - end up with a detached head and flail around. I don't understand why this is so hard to do - and can only think its because everything is based on graphs of graphs and so there is the potential that going back in time can break this? Anyway - what is the foolproof way to go back to the older point, and then start coding so that this becomes the new Head?
There are two different questions in here.
- How can you go back to some older commit?
In iceberg this is done by creating a new branch from the commit you���re interested in. The ���Branch������ menu will open a pop-up to allow you creating a new branch from that point in time.
Then you can checkout that branch and work as with any other branch.
- How can you undo some history (that was even pushed)?
Iceberg does not support this scenario yet, as it could be very problematic when working in teams.
Undoing some history / removing some commit will produce undesired effects on people that had pulled that commit.
This is one of the scenarios that in git requires a `���force` flag.
If you want to do such a thing, you need for now to do it from the command line
```sh
$ git reset ���hard THE_COMMIT_ID_YOU_WANT_TO_GO_BACK_TO
$ git push -f
```
G
Pointers on these two items greatly appreciate for my road to vcs greatness (and gosh I mess Envy - as I haven't asked about showing me deleted "available methods" and "classes")
Tim