How to use Git in command line

I can't understand this. I litterally just want to upload some files, but they make it impossible.
150 Replies
13eck
13eck9mo ago
As I said before:
Be sure to include the steps you took, what's not working, what should be happening, and any error messages you get
"I don't understand" isn't a question. it's a statement. No one can refute it
Deacon
DeaconOP9mo ago
I don't know what isn't working, if I don't know what's supposed to do what. So much for 10 minutes of research
13eck
13eck9mo ago
Step 1: Install Git Step 2: type git -v and see if it prints the currently installed version number Step 3: Watch this 23m video Step 4: use it
Deacon
DeaconOP9mo ago
2.39.2
13eck
13eck9mo ago
Great, now create a repo in github and follow the instructions. You literally copy/paste the code into your terminal. Then you're done
Deacon
DeaconOP9mo ago
I tried copy pasting, and that did nothing. I tried that earlier They said that "innit" was supposed to make a .git folder, but that didn't work Any ideas?
ErickO
ErickO9mo ago
init, "innit" is slang how do you know it didn't work? it is a dotfile so it could be hidden to you
Deacon
DeaconOP9mo ago
Wait, it added a file with the name of my project in my files, will that stay uploaded to git once I add a file? "fatal:adding files failed" I fucking hate this
ἔρως
ἔρως9mo ago
can you actually show the error? and what you have done?
Deacon
DeaconOP9mo ago
Here it is
No description
Deacon
DeaconOP9mo ago
And yes I'm using ChromeOS
ἔρως
ἔρως9mo ago
where did you run the git init?
Deacon
DeaconOP9mo ago
/home/deaconburch/.git/
ἔρως
ἔρως9mo ago
yeah, you blew it
Deacon
DeaconOP9mo ago
What do you mean?
ἔρως
ἔρως9mo ago
its not your fault, but you did it wrong
ἔρως
ἔρως9mo ago
what do you want to send to git?
Deacon
DeaconOP9mo ago
Like... 200 somethin mb of files this is why I love google drive, they make it so simple
ἔρως
ἔρως9mo ago
git isnt google drive
Deacon
DeaconOP9mo ago
I know I wish
ἔρως
ἔρως9mo ago
both do different things but anyway which folder do you want to send to git?
Deacon
DeaconOP9mo ago
/HTMLOS Well, it's just called HTMLOS
ἔρως
ἔρως9mo ago
then get inside that folder, with cd and then you can do git init there
Deacon
DeaconOP9mo ago
ARE YOU FUCKING KIDDING ME IT'S THAT SIMPLE?
ἔρως
ἔρως9mo ago
basically, yes then you add all the files and commit everything
Deacon
DeaconOP9mo ago
IT TOOK THEM HOURS TO TELL ME NOTHING, THEN YOU TELL ME THE WHOLE PROCCESS IN 1 SECOND
ἔρως
ἔρως9mo ago
its a lot easier if you use vscode
Deacon
DeaconOP9mo ago
I do use VSCode?
ἔρως
ἔρως9mo ago
then open the folder in vscode
Deacon
DeaconOP9mo ago
Hold on it's starting
ἔρως
ἔρως9mo ago
alright
Deacon
DeaconOP9mo ago
Hold on let me reboot Crostini
ἔρως
ἔρως9mo ago
take your time this whole process is a few clicks in vscode
Deacon
DeaconOP9mo ago
okay Here
ἔρως
ἔρως9mo ago
show mr me show me whats in vscode
Deacon
DeaconOP9mo ago
Sorry, I can't take screenshots of stuff from crostini in chromeos, don't ask me why this stuff is weird
ἔρως
ἔρως9mo ago
thats file
Deacon
DeaconOP9mo ago
"thats file"
ἔρως
ἔρως9mo ago
fine
Deacon
DeaconOP9mo ago
oh ok Actually, could we just use git? at this point, I've gotten so far into git I want to finish in git
ἔρως
ἔρως9mo ago
sure
Deacon
DeaconOP9mo ago
thanks sorry
ἔρως
ἔρως9mo ago
you should be able to git add everything
Deacon
DeaconOP9mo ago
it says "fatal: pathspec 'everything' did not match any files"
ἔρως
ἔρως9mo ago
lol
Deacon
DeaconOP9mo ago
what?
ἔρως
ἔρως9mo ago
git add --all
Deacon
DeaconOP9mo ago
man, I'm dumb
ἔρως
ἔρως9mo ago
the "everything" isnt part of the command
Deacon
DeaconOP9mo ago
oh now how do I commit the stuff?
ἔρως
ἔρως9mo ago
you should be able to do git commit -m 'a message here' where 'a message here' is what will show as a the commit message in the repo
Deacon
DeaconOP9mo ago
commit message?
ἔρως
ἔρως9mo ago
since this is the first commit, something like 'first commit' is fine yes, so you can describe what the commit is all about
Deacon
DeaconOP9mo ago
I THINK I DID SOMETHING
ἔρως
ἔρως9mo ago
nice
Deacon
DeaconOP9mo ago
How do I see the stuff in the github link now?
ἔρως
ἔρως9mo ago
now, it should only be in your local repo, so, you have to git push
Deacon
DeaconOP9mo ago
remote: Support for password authentication was removed on August 13, 2021. crap
ἔρως
ἔρως9mo ago
you need to make a personal token
Deacon
DeaconOP9mo ago
Personal token? D:
ἔρως
ἔρως9mo ago
yeah, you can create one in github, in your profile
Deacon
DeaconOP9mo ago
What's a token?
ἔρως
ἔρως9mo ago
alternatively, you can create an ssh private certificate that just lets you send everything, but its rather annoying it's a personal token that you use as your password
Deacon
DeaconOP9mo ago
How do I do that? I know nothing about github
Deacon
DeaconOP9mo ago
Now it's telling me to go to settings that don't exist. I hate you Github. I'm going to break my damn keyboard over my knee
ἔρως
ἔρως9mo ago
this should exist ive used it before, quite a few times
Deacon
DeaconOP9mo ago
It's not showing up on the website
Chimi
Chimi9mo ago
GitHub usually has the steps written out for setting something up, no?
ἔρως
ἔρως9mo ago
are you sure you are in your profile settings, and not the repo settings? i sent the link
Deacon
DeaconOP9mo ago
Profile settings, I'm following the tutorial, but there is no "developer settngs" on my left side
ἔρως
ἔρως9mo ago
its just "settings"
Deacon
DeaconOP9mo ago
I'm in settings, and I see nothing about tokens What do I do?
ἔρως
ἔρως9mo ago
🤔
Deacon
DeaconOP9mo ago
what? did I do something wrong AGAIN?
ἔρως
ἔρως9mo ago
no
Deacon
DeaconOP9mo ago
oh This should NOT be the industry standard this is ridiculous
Chimi
Chimi9mo ago
No description
Deacon
DeaconOP9mo ago
I'm not using a phone
ἔρως
ἔρως9mo ago
you know you can upload the files directly to your repo, right?
Deacon
DeaconOP9mo ago
what?
ἔρως
ἔρως9mo ago
if thats all you wanna do, and dont intend to edit the files for now, you can just add the files better yet, you can press the "." key and you have vscode online, for your repo
ἔρως
ἔρως9mo ago
that explains how you can add the files to github
Deacon
DeaconOP9mo ago
YES I DID ITR
ἔρως
ἔρως9mo ago
this way, you can actually go the easy route of cloning and then you just use your username and personal token to access the repo later on, if you want now, all the files are in the repo?
Deacon
DeaconOP9mo ago
Almost all I'm uploading the last few Then I can show you guys my project!
ἔρως
ἔρως9mo ago
lets see how it goes btw, its not just "industry standard": git management (or almost any source control) is/should be a requirement to code in a company
Deacon
DeaconOP9mo ago
After a few minutes it should be ready!
ἔρως
ἔρως9mo ago
nice! you're uploading the files directly, instead of the directory, right? oh, and you're NOT uploading the node_modules folder, right?
Deacon
DeaconOP9mo ago
?
ErickO
ErickO9mo ago
you say these things before the act not after 😔
Deacon
DeaconOP9mo ago
I think I didn't mess it up XD
ἔρως
ἔρως9mo ago
you dont need to upload the node_modules folder you can start over, its fine
Deacon
DeaconOP9mo ago
I don't know what that is so I think I'm fine
ἔρως
ἔρως9mo ago
its the big ass folder that you get when you use npm, yarn, pnpm or npx to install node packages to your repo
Deacon
DeaconOP9mo ago
Yeah I'm fine
ἔρως
ἔρως9mo ago
if you didnt use any of that, its fine
Deacon
DeaconOP9mo ago
Ok
ἔρως
ἔρως9mo ago
after uploading the files, you should be able to work on them with the built-in vscode editor that should be enough for now
Deacon
DeaconOP9mo ago
I'm about to test it! Uh-oh New idea😥
ἔρως
ἔρως9mo ago
oh boy ideas at 4am are a dangerous thing
Deacon
DeaconOP9mo ago
It didn't all make it in there
ἔρως
ἔρως9mo ago
upload what didnt made it
Deacon
DeaconOP9mo ago
Also, where I am it's 11:34 P.M
ἔρως
ἔρως9mo ago
here's +5 hours ahead
Deacon
DeaconOP9mo ago
Where are you?
ἔρως
ἔρως9mo ago
portugal
Deacon
DeaconOP9mo ago
Oh, I'm from indiana
ἔρως
ἔρως9mo ago
oh, you're from usa
Deacon
DeaconOP9mo ago
yes I wish I weren't
ἔρως
ἔρως9mo ago
there are worse countries so, did it work?
Deacon
DeaconOP9mo ago
I have to shorten down an audio file it's 80mb too big
ἔρως
ἔρως9mo ago
wtf? how? how long is it? thats almost 3 hours of music in mp3, or 2 flac songs
Deacon
DeaconOP9mo ago
it's 30 minutes of mp3
ἔρως
ἔρως9mo ago
yeah, want my advice? DO NOT uploads music to github
Deacon
DeaconOP9mo ago
I have to
ἔρως
ἔρως9mo ago
you can get your git dmca'd and it goes bye bye
Deacon
DeaconOP9mo ago
You know what, good night, sorry I'm tired dmca'd?
ἔρως
ἔρως9mo ago
yes
Deacon
DeaconOP9mo ago
what's that? what's dmca'd?
ἔρως
ἔρως9mo ago
Digital Millennium Copyright Act
The Digital Millennium Copyright Act (DMCA) is a 1998 United States copyright law that implements two 1996 treaties of the World Intellectual Property Organization (WIPO). It criminalizes production and dissemination of technology, devices, or services intended to circumvent measures that control access to copyrighted works (commonly known as di...
Deacon
DeaconOP9mo ago
It's just classical music bethoven
ἔρως
ἔρως9mo ago
that could be fine, but im not an expert in this
Deacon
DeaconOP9mo ago
oh, ok. I'm not using anything new, nothing copywrited, I was careful about that Good night
ErickO
ErickO9mo ago
yeah uh, not to be the bearer of bad news but classical music is sorta copyrighted
Deacon
DeaconOP9mo ago
I hate this country
ErickO
ErickO9mo ago
not the piece itself but the interpretation is so whoever interprets the piece can copyright their version
Deacon
DeaconOP9mo ago
I hate this country so much
ErickO
ErickO9mo ago
nuanced :shrug: also maybe you can shrink the file size? if you can do it to images surely there's something for music files too
ἔρως
ἔρως9mo ago
also, if you intend to host the files, so people access it over a website, you might want to check out the latest bs from netlify
Deacon
DeaconOP9mo ago
I'm not hosting the files, just sharing them
ἔρως
ἔρως9mo ago
a 3mb file was accessed to hell and back, and the guy racked up ~$105k in bandwidth costs
Deacon
DeaconOP9mo ago
what? I don't want money well, debt
ἔρως
ἔρως9mo ago
yeah, but it was where he was hosting the files since you arent hosting, its fine
Deacon
DeaconOP9mo ago
ok
ἔρως
ἔρως9mo ago
i would still avoid music
Deacon
DeaconOP9mo ago
I need the music it's sample music like how windows used to have sample music?
ἔρως
ἔρως9mo ago
yes, but you dont need 80mb of it a quick tune is fine
Deacon
DeaconOP9mo ago
I'm going to shorten it down good night!
ἔρως
ἔρως9mo ago
goodnight
majkl
majkl9mo ago
man git
ἔρως
ἔρως9mo ago
that works if your distro ships the git manuals too but he's using a chromebook, so, i doubt it has man
Deacon
DeaconOP9mo ago
GitHub
GitHub - decoder181/HTMLOS: HTMLOS is a mini operating system ran i...
HTMLOS is a mini operating system ran in the browser. To use, open "HTMLOS.html" - decoder181/HTMLOS
ἔρως
ἔρως9mo ago
nice!
bluestreak711
bluestreak7119mo ago
I am following because this is on my list of things to learn.
ἔρως
ἔρως9mo ago
its easier to start the other way around make the repo put the files there clone locally and done
Want results from more Discord servers?
Add your server