Forums

Push, don't pull: "Stealing" your own files from PythonAnywhere

Hello there! I've went and done something incredibly stupid (again). I was tinkering with layouts, settings and functionality from my local env that wasn't very compatible with the PA standards, thus I had to fix a bunch of issues after pulling the code from git to PA. Being overeager I decided to do this by editing files on the server, not really considering the ramifications at the time.

Now I've more or less forgotten which files I've touched and what was done, and I'm not too keen on the idea of re-fixing it all locally as the amount of edits in question is somewhat substantial for my newbie self.

Simply put: Is there a way I could "go the other way" in terms of data transfer? Can I somehow download all my project folders to my desktop in a simple manner?

Are all the changes showing up in git?

Hi Conrad, I'm not really sure how I should check that. There are a lot of things still that I must become better acquainted with in this brave new world that I've discovered no more than a year ago :)

Edit: I've just noticed that a folder bearing the name of the git in question (not the same as my local project's name) has been added to my local project folder. I'm fairly certain that I neither put it there nor gave it that name. Upon inspection none of the files I know I've touched remain unchanged however. As confused as ever by now :D

Edit2: I've found a method of snatching the files that eases the workload substantially (download file, right click, save source) by now, so crisis averted; I've got a backup of my work in hand. I'm still in the market for a CLI/BASH-type of method if such a thing exists, but I've resolved my problem and I know you guys are busy. Thank you for responding :)

If you run the command

git status

...from bash while you're cded into a directory containing a git repository, it will print out all of the files that have been changed from the last committed version. Then you can git add them, and git push the changes to github (or BitBucket, or whatever git host you're using). Once that's done, you can git pull them down to your local machine. If in the meantime you have also made changes on the local machine, git will do its best to reconcile the changes -- a "merge".