#๐Ÿ”’ Need help with github

33 messages ยท Page 1 of 1 (latest)

mellow cape
scenic roverBOT
#

@mellow cape

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

mellow cape
#

i feel like i shouldnt have cloned from that repo and instead done something else

#

but i dont know what

foggy wind
# mellow cape i feel like i shouldnt have cloned from that repo and instead done something els...

Clone means that origin url is exact url you cloned from. Push uses origin url.
You want to fork ๐Ÿด the repo -> split your own code from original and make it run at its own thing (when you draw the commit tree, the bottom is the single line and then higher up they split into two or more, giving the fork teeth).

It can be done in github/other git repo hosting by hitting fork button and then cloning the resulting repo...

But you can also just change config of your existing repo.
You need to change upstream (imagine the forking lines being a stream - you gotta swim back to where original was) to point to original, and make your own repo url be a new origin remote.
This shows the commands to do those steps - https://gist.github.com/ElectricRCAircraftGuy/8ca9c04924ac11a50d48c2061d28b090
From step 2.

Gist

How to move to a fork after cloning. GitHub Gist: instantly share code, notes, and snippets.

mellow cape
#

i see

#

thank you

#

i know about clone and now about fork
are there any other things i should know about?

brazen summit
#

there are quite a few things you may want to know, put the basic commands for general usage are usually only: add, commit, push and pull

mellow cape
#

what is the difference between add and commit?

brazen summit
#

it could help to use a GUI app for that. I use pycharms built-in version control features, but GitHub Desktop also seems nice from what I occasionally saw.

#

you may have multiple edited files in your code, but only want to commit a few of them.
with git add you decide which files should be committed.
And a "commit" is the actual "saving to the log/history" mechanic.

mellow cape
#

oohh

#

lets say i make a few changes

#

i can then add them

#

then commit

#

then make few more changes, then commit

#

and now i can finally push

brazen summit
#

exactly

mellow cape
#

nicee

#

what happens when i commit but dont push

#

can others view my code?

brazen summit
#

it stays on your computer

mellow cape
#

oh

brazen summit
#

push is the "uploading to github" part.

mellow cape
#

and pull is to get other ppl's push

brazen summit
#

(or any remote git repository for that matter. it's not limited to github)

#

yes

mellow cape
#

i see it makes sense now

#

thanks a lott

#

!close

scenic roverBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.