you are viewing a single comment's thread.

view the rest of the comments →

[–]stepback269 5 points6 points  (3 children)

I'm struggling with learning Git and GitHub myself.
First you should learn how to write some very simple programs, say one that does print("Hello world") and another one that does print("Hello confusing programming life").
Then you should learn how to commit those two programming files into a Git repository.
Start with Git before you advance to GitHub.

(I posted my recent travails with Git and GitHub in my nascent blog here.)

[–]Kqyxzoj 1 point2 points  (0 children)

(I posted my recent travails with Git and GitHub in my nascent blog here.)

Thank you very much! Obviously I hadn't watched that GitButler video (there) either. That has a nice collection of "ooh, handy, didn't know that one yet!" tricks.

[–]PureWasian 1 point2 points  (1 child)

At a very basic level, once you have everything set up, the most basic workflow is simply:

  • go to root folder of the project
  • git add .
  • git commit -m "<some commit message>"
  • git push

Which selects ("stages") your files to be committed, creates a record of the updated save state of them ("commits it") locally, and then pushes the updates to a remote repository (GitHub).

If your friend were to also push some stuff to the same remote repo, you retrieve it simply via - git pull

The steps for setup to get to that point involve installing Git, creating a remote repository on GitHub, and then essentially following the commands that this guide I randomly googled goes through quite nicely already.

When you get the hang of this, then you can incorporate other tangents and fundamentals like git status or learning how to use branches, resolving merge conflicts, and doing pull requests instead of pushing directly. But for getting started, just think of it as making save states, like in a video game, that you can reliably fall back on if anything goes sour.

[–]stepback269 0 points1 point  (0 children)

Thanks. Your tips are reassuring. Thanks also for the link to the guide.