The following steps should work assuming you haven't added any more commits
after the mistake (and haven't pushed your changes anywhere else).  Also,
your current checkout is the one with the mistake (if not, first do F UP to
the appropriate check-in):

f co prev --keep
f pur ch tip
f com file1 file2 file3 ...
f pur o 1
f reb

(where f = fossil)
First line goes back one check-in without changing any of your files on
disk.
Second line purges the mistake (and gives a number -- usually 1 if no more
purges pending -- use this number later)
Third line commits the files you meant to commit (file1 file2 file3 ...)
Fourth line completely kills the purged content from the repo (use the
number you got in step 2)
Final line rebuilds the repo and removed the purged content.

I get into this situation often, and these steps (if done right after the
mistake -- and not many actions later) work well.

(If anyone has a quicker method, please enlighten us.)

-----Original Message----- From: Aldo Nicolas Bruno
Sent: Monday, December 05, 2016 11:44 PM
To: Fossil SCM user's discussion
Subject: Possible Spam(10.041):[fossil-users] error in commit

Hi,
By mistake I've made an error and did fossil commit -m "added lalal"
without specifying which files to commit, so it commited all the changed
files... but my intention was to commit only some files...
There is a way to elegantly undo the commit or modify it so as to
exclude some files?
Thanks
Aldo
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to