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