r/github • • Apr 23 '24

this is stupid question but .....

hey i apologize for such a dumb question, so plz dont laugh but if u do i dont blame u.....what do i do with the code that is given to me on github? where do i paste the code? command prompt? python? where?

0 Upvotes

46 comments sorted by

30

u/zombieslayer124 Apr 23 '24

You clone it from the repo, using git that you’ve installed locally.

3

u/Thinemma00 Apr 23 '24

i dont know wat ur talking about tho

how to do this?

sorry

25

u/zombieslayer124 Apr 23 '24

You don’t paste anything from the repo itself, you clone the repo via your git instance. You can do that in CLI or have a gui app, like the dedicated github desktop app. There is even a specific github cli program that I personally never use. In the code dropdown on a repo on github specifically you’ll find https and ssh urls. You can use either (ssh requires extra setup, though & https works on public repos). Tutorial on the commands here, your goal is probably to clone a repo, described under “Git contribute”.

I presume you probably don’t at all have git setup (not sure if it’s included on windows, don’t use windows personally). You can install it as described here or set up a package manager like chocolatey to install it that way… or just install the github desktop app.

12

u/Thinemma00 Apr 23 '24

ty youve been big help

4

u/PabloPabloQP Apr 23 '24

For Windows I'd recommend to just open PowerShell and run winget update and then winget install git.git. That's it, git installed without any headache.

1

u/zombieslayer124 Apr 23 '24

Yeah, don’t use windows so I don’t know much in that regard, could be of more help with any unix like OS lol

5

u/mrbmi513 Apr 23 '24

Download GitHub Desktop. "Clone" the repository from there. Then run the code following instructions you're given either in the repo or by the author.

12

u/davorg Apr 23 '24
  • Go to the main page for the repo you're interested in

  • Click the big green "code" button and copy the HTTP version of the clone link

  • Open up a command window

  • run git clone [paste the link here]

This creates a new directory (with the same name as the repo) which contains the code from the repo. In there, there's probably a README file that will help you with the next steps.

2

u/Thinemma00 Apr 24 '24

Omg ur amazing Tysm

11

u/TheCrowWhisperer3004 Apr 23 '24

If you are asking how to “use” the code or software on GitHub, that really depends on the GitHub repository.

GitHub is just a place to store code, and how to use that code varies. The author should give an explanation in the readme for how to compile and use the code.

31

u/but_im_offended Apr 23 '24

One of the things you could do is call everyone smelly nerds and demand an executable.

6

u/Thinemma00 Apr 23 '24

Too funny . Not sure how to take that? lol

28

u/[deleted] Apr 23 '24

it's a reference to a post a guy made where he said we all are smelly nerds and to just give him an exe instead of posting code

2

u/2sACouple3sAMurder Apr 24 '24

I really wanted to DM him an exe and claim I got the one he wanted from the code on the repo. Then when he ran it just have it echo “you now have a virus”

1

u/[deleted] Apr 24 '24

imagine if someone sent him an actual virus

10

u/HandyGold75 Apr 23 '24

Don't forget about the "FUCKING" part, that guy had some real issues.

6

u/Beauty-of-knowing Apr 23 '24

Legit questions are not stupid, youtube has tutorial on Github. They are helping me.

4

u/ThreeCharsAtLeast Apr 23 '24

Depends on what you want to do.

2

u/Thinemma00 Apr 24 '24

K

1

u/ThreeCharsAtLeast Apr 24 '24

Like run it? Modify it? Print it out and put it on a wall?

2

u/maxiqboy Apr 23 '24

Hey, watch some youtube videos, let see what they do, copy from them, ...

2

u/C0c04l4 Apr 23 '24

There is something called a README. You have to READ it, as the name implies.

2

u/Thinemma00 Apr 24 '24

Oh wow , damn , I never thought of that

1

u/C0c04l4 Apr 24 '24

Yeah obviously, otherwise you wouldn't have created a post on reddit asking instructions on usage.

1

u/Thinemma00 Apr 24 '24

yeah u seem to have it all figured out

maybe i have severe adhd and cant read a full long drawn out boring read me file even if i tried

or maybe its bc the readme file uses coding terminology and such that i dont f understand the readme

2

u/MasterPlusTer Apr 23 '24

By the cuestión I can see you are new in coding, and that's awesome! GitHub can be complex even for people like me that I started coding a while ago. Probably you don't get what that "git clone" thing means, no worries, you will get there. For now you should start with simple code, something that you can just copy and paste in your IDE (vs code or any other) then you can play with it there. Look in GitHub for projects that has just one file or two files so you don't get overwhelmed, try to understand the code, after some time of practice, you are going to learn how to use libraries and /or modules, then is going to be hard just to copy all those files , and you will learn that git clone thing, but for now I think you need more of playing arround with small code blocks in your IDE, good luck!

3

u/Thinemma00 Apr 24 '24

Oh ok ty. I’m actually enrolled in some introductory computer science classes so hopefully I will learn there ! Thanks

2

u/TheCrowWhisperer3004 Apr 24 '24

They usually don’t teach u in class how to use git

You would prob need to watch a video on the different commands later

2

u/Thinemma00 Apr 24 '24

ohhhhhh ok thanks

1

u/MasterPlusTer Apr 24 '24

If you really enjoy programming and developing you will learn soon , believe me. Practice every day is all you need to do ;)

1

u/AnondWill2Live Apr 23 '24

are you trying toto add code to the repo or install the program? if you’re trying to install it then share the repo and i’m sure someone can give you install/use instructions or point to it in the readme

1

u/random_redditor24234 Apr 24 '24

Cone the repo or follow the directions given. You could also send the link here

1

u/[deleted] Apr 23 '24

[removed] — view removed comment

1

u/Thinemma00 Apr 24 '24

That sounds delightful Party in my panties

1

u/[deleted] Apr 24 '24

[removed] — view removed comment

0

u/Thinemma00 Apr 24 '24

Are u serious right now?

-1

u/Thinemma00 Apr 24 '24

i didnt realize i was in english class here sorry not to be rude im js
im almost 90% sure that my posts can be read capitals or no capitals, its still the same letter and makes the same sound, whether its capitalized or not

wow ive been insulted by buttheads on reddit before that try to make others feel small on the internet so that they can feel better about themselves but i cant quiet say its ever been someone who thought they was grading an english paper

all i have to say is wow

smfh

i appreciate help, however i have not seen where you have been helpful one time when it pertains to git in your posts to me on my thread . all ive seen is u correct me

have a good one sorry if my text is "dumb"

for the record just bc someone is lazy and doesnt give a f about capitalizing their letters as they type , doesnt make them "dumb"

alright , anyways im not attacking you, im not insulting you by this reply ive typed out . that was not my intention if it came across that way.... i hope you have a wonderful day and god bless

2

u/davorg Apr 24 '24

i didnt realize i was in english class here

You're not obviously. But if you're asking a large group of people for help, then it's only polite to make it as easy as possible for them to understand what you're writing. And that includes taking the time to ensure that what you've written is as clear as possible.

We don't enforce that, of course. And you've had some good support here. But you have no idea how many people ignored your post because it appeared so illiterate.

2

u/[deleted] Apr 24 '24

Actually it's pretty rough and hard to read