Forums

Changes from Pythonanywhere to GitHub and then to Local Machine

I have made changes directly in the code in Pythonanywhere.

Now, I want to send these changes to Github where I have a repository (the code I send to Pythonanywhere before I made the changes directly in the code in Pythonanywhere).

My question is: How can I send the changes to Github and then to my local machine? I have a virtual environment in Pythonanywhere and in my local machine.

Thanks in advance.

How did you get the code on PythonAnywhere on the first place? Did you clone the repo? If so, you should add changed files, commit changes and push. Then you'll be able to pull them on your local machine.

The first time I pull the code into Pythonanywhere from GitHub. Please, can you tell me step by step how to do the push now from Pythonanywhere to Github? In particular, in what directory or virtual environment I need to start the process in a bash console? Thanks again.

You just need to go to the project directory and perform git operations there (you don't need to activate virtual environment for that).