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
13eck10mo 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
DeaconOP10mo 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
13eck10mo 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
DeaconOP10mo ago
2.39.2
13eck
13eck10mo 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
DeaconOP10mo 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
ErickO10mo 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
DeaconOP10mo 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
ἔρως
ἔρως10mo ago
can you actually show the error? and what you have done?
Deacon
DeaconOP10mo ago
Here it is
No description
Deacon
DeaconOP10mo ago
And yes I'm using ChromeOS
ἔρως
ἔρως10mo ago
where did you run the git init?
Deacon
DeaconOP10mo ago
/home/deaconburch/.git/
ἔρως
ἔρως10mo ago
yeah, you blew it
Deacon
DeaconOP10mo ago
What do you mean?
ἔρως
ἔρως10mo ago
its not your fault, but you did it wrong
ἔρως
ἔρως10mo ago
what do you want to send to git?
Deacon
DeaconOP10mo ago
Like... 200 somethin mb of files this is why I love google drive, they make it so simple
ἔρως
ἔρως10mo ago
git isnt google drive
Deacon
DeaconOP10mo ago
I know I wish
ἔρως
ἔρως10mo ago
both do different things but anyway which folder do you want to send to git?
Deacon
DeaconOP10mo ago
/HTMLOS Well, it's just called HTMLOS
ἔρως
ἔρως10mo ago
then get inside that folder, with cd and then you can do git init there
Deacon
DeaconOP10mo ago
ARE YOU FUCKING KIDDING ME IT'S THAT SIMPLE?
ἔρως
ἔρως10mo ago
basically, yes then you add all the files and commit everything
Deacon
DeaconOP10mo ago
IT TOOK THEM HOURS TO TELL ME NOTHING, THEN YOU TELL ME THE WHOLE PROCCESS IN 1 SECOND
ἔρως
ἔρως10mo ago
its a lot easier if you use vscode
Deacon
DeaconOP10mo ago
I do use VSCode?
ἔρως
ἔρως10mo ago
then open the folder in vscode
Deacon
DeaconOP10mo ago
Hold on it's starting
ἔρως
ἔρως10mo ago
alright
Deacon
DeaconOP10mo ago
Hold on let me reboot Crostini
ἔρως
ἔρως10mo ago
take your time this whole process is a few clicks in vscode
Deacon
DeaconOP10mo ago
okay Here
ἔρως
ἔρως10mo ago
show mr me show me whats in vscode
Deacon
DeaconOP10mo ago
Sorry, I can't take screenshots of stuff from crostini in chromeos, don't ask me why this stuff is weird
ἔρως
ἔρως10mo ago
thats file
Deacon
DeaconOP10mo ago
"thats file"
ἔρως
ἔρως10mo ago
fine
Deacon
DeaconOP10mo 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
ἔρως
ἔρως10mo ago
sure
Deacon
DeaconOP10mo ago
thanks sorry
ἔρως
ἔρως10mo ago
you should be able to git add everything
Deacon
DeaconOP10mo ago
it says "fatal: pathspec 'everything' did not match any files"
ἔρως
ἔρως10mo ago
lol
Deacon
DeaconOP10mo ago
what?
ἔρως
ἔρως10mo ago
git add --all
Deacon
DeaconOP10mo ago
man, I'm dumb
ἔρως
ἔρως10mo ago
the "everything" isnt part of the command
Deacon
DeaconOP10mo ago
oh now how do I commit the stuff?
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
commit message?
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
I THINK I DID SOMETHING
ἔρως
ἔρως10mo ago
nice
Deacon
DeaconOP10mo ago
How do I see the stuff in the github link now?
ἔρως
ἔρως10mo ago
now, it should only be in your local repo, so, you have to git push
Deacon
DeaconOP10mo ago
remote: Support for password authentication was removed on August 13, 2021. crap
ἔρως
ἔρως10mo ago
you need to make a personal token
Deacon
DeaconOP10mo ago
Personal token? D:
ἔρως
ἔρως10mo ago
yeah, you can create one in github, in your profile
Deacon
DeaconOP10mo ago
What's a token?
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
How do I do that? I know nothing about github
Deacon
DeaconOP10mo 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
ἔρως
ἔρως10mo ago
this should exist ive used it before, quite a few times
Deacon
DeaconOP10mo ago
It's not showing up on the website
Chimi
Chimi10mo ago
GitHub usually has the steps written out for setting something up, no?
ἔρως
ἔρως10mo ago
are you sure you are in your profile settings, and not the repo settings? i sent the link
Deacon
DeaconOP10mo ago
Profile settings, I'm following the tutorial, but there is no "developer settngs" on my left side
ἔρως
ἔρως10mo ago
its just "settings"
Deacon
DeaconOP10mo ago
I'm in settings, and I see nothing about tokens What do I do?
ἔρως
ἔρως10mo ago
🤔
Deacon
DeaconOP10mo ago
what? did I do something wrong AGAIN?
ἔρως
ἔρως10mo ago
no
Deacon
DeaconOP10mo ago
oh This should NOT be the industry standard this is ridiculous
Chimi
Chimi10mo ago
No description
Deacon
DeaconOP10mo ago
I'm not using a phone
ἔρως
ἔρως10mo ago
you know you can upload the files directly to your repo, right?
Deacon
DeaconOP10mo ago
what?
ἔρως
ἔρως10mo 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
ἔρως
ἔρως10mo ago
that explains how you can add the files to github
Deacon
DeaconOP10mo ago
YES I DID ITR
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
Almost all I'm uploading the last few Then I can show you guys my project!
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
After a few minutes it should be ready!
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
?
ErickO
ErickO10mo ago
you say these things before the act not after 😔
Deacon
DeaconOP10mo ago
I think I didn't mess it up XD
ἔρως
ἔρως10mo ago
you dont need to upload the node_modules folder you can start over, its fine
Deacon
DeaconOP10mo ago
I don't know what that is so I think I'm fine
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
Yeah I'm fine
ἔρως
ἔρως10mo ago
if you didnt use any of that, its fine
Deacon
DeaconOP10mo ago
Ok
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
I'm about to test it! Uh-oh New idea😥
ἔρως
ἔρως10mo ago
oh boy ideas at 4am are a dangerous thing
Deacon
DeaconOP10mo ago
It didn't all make it in there
ἔρως
ἔρως10mo ago
upload what didnt made it
Deacon
DeaconOP10mo ago
Also, where I am it's 11:34 P.M
ἔρως
ἔρως10mo ago
here's +5 hours ahead
Deacon
DeaconOP10mo ago
Where are you?
ἔρως
ἔρως10mo ago
portugal
Deacon
DeaconOP10mo ago
Oh, I'm from indiana
ἔρως
ἔρως10mo ago
oh, you're from usa
Deacon
DeaconOP10mo ago
yes I wish I weren't
ἔρως
ἔρως10mo ago
there are worse countries so, did it work?
Deacon
DeaconOP10mo ago
I have to shorten down an audio file it's 80mb too big
ἔρως
ἔρως10mo ago
wtf? how? how long is it? thats almost 3 hours of music in mp3, or 2 flac songs
Deacon
DeaconOP10mo ago
it's 30 minutes of mp3
ἔρως
ἔρως10mo ago
yeah, want my advice? DO NOT uploads music to github
Deacon
DeaconOP10mo ago
I have to
ἔρως
ἔρως10mo ago
you can get your git dmca'd and it goes bye bye
Deacon
DeaconOP10mo ago
You know what, good night, sorry I'm tired dmca'd?
ἔρως
ἔρως10mo ago
yes
Deacon
DeaconOP10mo ago
what's that? what's dmca'd?
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
It's just classical music bethoven
ἔρως
ἔρως10mo ago
that could be fine, but im not an expert in this
Deacon
DeaconOP10mo ago
oh, ok. I'm not using anything new, nothing copywrited, I was careful about that Good night
ErickO
ErickO10mo ago
yeah uh, not to be the bearer of bad news but classical music is sorta copyrighted
Deacon
DeaconOP10mo ago
I hate this country
ErickO
ErickO10mo ago
not the piece itself but the interpretation is so whoever interprets the piece can copyright their version
Deacon
DeaconOP10mo ago
I hate this country so much
ErickO
ErickO10mo 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
ἔρως
ἔρως10mo 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
DeaconOP10mo ago
I'm not hosting the files, just sharing them
ἔρως
ἔρως10mo ago
a 3mb file was accessed to hell and back, and the guy racked up ~$105k in bandwidth costs
Deacon
DeaconOP10mo ago
what? I don't want money well, debt
ἔρως
ἔρως10mo ago
yeah, but it was where he was hosting the files since you arent hosting, its fine
Deacon
DeaconOP10mo ago
ok
ἔρως
ἔρως10mo ago
i would still avoid music
Deacon
DeaconOP10mo ago
I need the music it's sample music like how windows used to have sample music?
ἔρως
ἔρως10mo ago
yes, but you dont need 80mb of it a quick tune is fine
Deacon
DeaconOP10mo ago
I'm going to shorten it down good night!
ἔρως
ἔρως10mo ago
goodnight
majkl
majkl10mo ago
man git
ἔρως
ἔρως10mo ago
that works if your distro ships the git manuals too but he's using a chromebook, so, i doubt it has man
Deacon
DeaconOP10mo 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
ἔρως
ἔρως10mo ago
nice!
bluestreak711
bluestreak71110mo ago
I am following because this is on my list of things to learn.
ἔρως
ἔρως10mo 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