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