I have situation like this:
I have commited files a,b,c,d.Now i found that by mistake i commited
files a and b; so before pushing these changes, i want to do uncommit
files a and b so that i can push only c and d.Can someone tell me how
to do that by using mercurial commands.
Here uncommit means that i dunt want to use “hg out -p” and after that
looking change set and do things manually.
Assuming you haven’t performed any other transactions on your repository since you committed the files, I think you could do this as a 2 stage process:
hg rollbackshould remove the commit that you have just made, but leave the files as changed. Thenhg commit filec filedshould commit the files namedfilec&filed. Obviously you should replace these file names with the names of your actual files.It’s probably worth mentioning that you should be careful with
hg rollback– it alters the history, so it is possible to lose data with it if used incorrectly.