Forums

Check in files to github

Hi I now have a project that I would like to check back into version control. How do I sync the project back to Github?

thanks Nick

Assuming you already have a git remote called origin setup (this should have already been setup if you had git clone'd your project from github to PythonAnywhere. Use git remote to check)

  1. You need to git add any files that you want to save / check back into version control, and then git commit them.

  2. Once you have a new commit (Use git log to see if your commit shows up), you can git push to get it back onto Github.

There are a bunch of good resources online for how to use git, such as this one, which you can check out to delve deeper.

i have looked at the link you provided and tried doing what you suggest but with no luck.

I did git remote https://github.com/lz7cjc/recharge and got the following error

fatal: Not a git repository (or any parent up to mount point /home/lz7cjc) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I got the same error when i tried git add https://github.com/lz7cjc/recharge

fatal: Not a git repository (or any parent up to mount point /home/lz7cjc) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)

I have obviously misunderstood you so can you let me know where I am going wrong? thanks

Oh. You need to do all this from within /home/lz7cjc/recharge.

doesn't it default to that when I launch the bash console? https://www.pythonanywhere.com/user/lz7cjc/consoles/launch_bash_in_virtualenv.py/1100066/

No it starts at /home/lz7cjc/, since the virtualenv should theoretically be independent of your webapp.

You should look at the bash prompt and check out what location you are at btw. In this case, you want to cd recharge into the correct directory.

ah ok - thanks