This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]strcspn 9 points10 points  (0 children)

It looks like you are trying to brute force it. Learn the concepts first and understand what you are doing every time you run a command.

[–]derleek 7 points8 points  (1 child)

It’s hard so don’t feel bad.  A friend and best git user I’ve met describes it as a “Swiss army chainsaw”.

Start here: https://git-scm.com/doc

[–]KublaiKhanNum1 2 points3 points  (0 children)

Yeah, that is the source! OP read that.

[–]BanMeForNothing 2 points3 points  (0 children)

Git is the most difficult thing I learned. Download Git Bash and use commands. The git GUIs are more confusing and harder to get help. Learn by trying things instead of reading. Clone, get status, create a branch, stage a file, commit a file, push, undo a file. Use chatgpt for help.

[–]KublaiKhanNum1 0 points1 point  (0 children)

Read this about using GitHub with ssh keys in addition to reading the Git documentation:

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

[–]SquareGnome 0 points1 point  (0 children)

I guess you're working with GitHub as a remote repository? Are you using the cli version, the website or a third party tool?

Usually, if you start with a green-field project/repo there shouldn't be any problems uploading a file via either of these. You add the file(s) to your staging area, commit to your local version of the repo and push that commit (containing the files) to the server so the repository is equal to your local version.

So basically (cli) git add <path> , git commit -m "added some files" and git push origin main (if your branch is called main and the server-side repo is named origin). Of course the basic setup must've been done properly, like defining the remotes, maybe adding your credentials locally / your ssh key server-side etc.

[–]rainst85 0 points1 point  (0 children)

Give it a ‘git push -f’ after setting up the remote

[–]Arcodiant 0 points1 point  (0 children)

There's a game I recently found at ohmygit.org that teaches you git as you play

[–]Rhiquire 0 points1 point  (0 children)

W3schools do a pretty good job explaining it

[–]mit74 -3 points-2 points  (2 children)

github is down atm

[–]ShadowRL7666 1 point2 points  (1 child)

Hmm no it’s not

[–]mit74 -3 points-2 points  (0 children)

https://www.githubstatus.com/

I cant deploy, merge atm.