How can I only use Github to save versions of my code as I continuously develop?

Question:

I am a single developer that creates python programs to automate my work. I often update the code as work duties change or I find improvements. I want to have a cloud-based version control like Github but I don’t want all of the other capabilities that the tutorials seem to push me through. I want to write code on my computer, save a copy to github, update code on computer, update the copy on Github, etc. I don’t need to clone, fork, pull, work in teams, develop on multiple computers, etc. Is there a simple way to push changes directly to a Github repository without Git?

I am using PyCharm Community Edition with Python 3.7 Windows 10

Asked By: Tyler Anderson

||

Answers:

To push changes to a git repository, you need to either install git or use it via web interface. You can install the desktop application, or just git (so that once everything is set up you can simply add changes, commit, and then push). To access via a browser, just log in to github and the repository (that you have permissions for) and edit or upload files (which, kind of breaks the whole idea).

In pycharm you have git integration and it is easy to install git in windows OS.

Answered By: braulio

Just because you want simplicity, install GitHub desktop.

1) Create a repository in GitHub.

2) Enter the repo link in GitHub desktop and press the clone button to download it.

3) Write your code

4) To upload, just click commit and push button

Nothing else that you need to know and worry about

Answered By: Piyush Gupta

Git is the CLI version that helps you manage your code.
You could use Github from your browser. This will help you manage your codes via GUI.
And by the way, It does not really take much to update a file on github.

You would have to have at least one Repository in which you got all your code files.
You could just

  • upload your files to that Repository via GUI
  • or use the CLI codes, which are purely simple.
    • git clone myurl creates a local copy of the repo
    • git pull downloads the latest version.
    • git add myfilename.ext starts tracking/watching file for next commit
    • git add * adds all files to be tracked/watched
    • git commit -m "my message about commit" saves new version or snapshot of the project
    • git push uploads stuff to the github db

This link would further be of help.

Answered By: Jitin

You can use the Web Based Editor, that is "github.dev". Not to be confused with Github CodeSpaces, which would also allow you to run Python, but is not free.

To edit a repo’s main branch with Github’s Web Based Editor:

  1. To open the repository in the same browser tab, press . while browsing any repository or pull request on GitHub.
  2. Edit your code
  3. Press Co+Shift+G or Right click the menu bar to enable the Source Control button. It appears to be hidden by default to get you to pay for CodeSpaces.
  4. Commit

Source: https://docs.github.com/en/codespaces/the-githubdev-web-based-editor

Answered By: Ray Foss
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.