I'm using Cloud9 and I'm fairly new at it and I wrote a "rails g Scaffold" statement and ran it but I forgot to make changes before that. Is there any way I can rollback any changes made today to a previous date? The last time I worked on this was 3 days ago and I want to revert all changes so that my site looks like what it did 3 days ago instead of me starting from scratch again.
Asked
Active
Viewed 257 times
0
-
Are you using a version control system like git? – moveson May 02 '17 at 15:46
-
I'm sorry I'm not sure what you mean by that..are you talking about GitHub? Then no I have not backed up my project on there. – John Doe May 02 '17 at 15:50
-
@JohnDoe git lets you define snapshots of your application at various points in time. Github is a web UI for these 'repositories' but git is a program you run on your computer. It'd be too late to rollback if you hadn't used it thus far, but it'd be good to start making commits now. By the way, all `rails g` commands have an analogous `rails d` or `rails destroy` command to remove the generated files. – max pleaner May 02 '17 at 16:06
-
What are you using to keep track of changes? – MZaragoza May 02 '17 at 16:23
1 Answers
1
It depends on if you are using any version control system like github.com
If you use github, for example, there is a number of ways to do it, I can walk you through if that's the case.
For Cloud9 I would try doing what's described here https://docs.c9.io/docs/file-revision-history

user3735111
- 155
- 2
- 10
-
Indeed, if you haven't been using git the best option here is to use file revision history. – Brady Dowling May 03 '17 at 16:59