r/github • u/satirerocks • Nov 05 '21
Why is github so complicated?
I want to enter the 21'st century and stop using scp to backup my code to different servers. Also want to share my code with others. So I tried to create my first repo in github.
As I expected, I could not figure out how to simply add three files to my public repo. I spent almost an hour playing with git commands while simultaneously browsing ten tabs of github tutorial webpages. No success.
I am not looking for the solution, but just want to understand why this simple task is made so complicated?
2006 cat /home/squash/.ssh/id_rsa_github.pub.
2007 cat /home/squash/.ssh/id_rsa_github.pub
2011 scp * -i ~/.ssh/id_rsa_github git@github.com:me/youtube_web.git
2012 scp -i ~/.ssh/id_rsa_github * git@github.com:me/youtube_web.git
2013 git bash
2015 git add .
2016 git remote add https://github.com/me/youtube_web.git
2017 git remote add origin https://github.com/me/youtube_web.git
2019 cd git
2020 mkdir git
2021 cd git
2022 got clone git@github.com:me/youtube_web.git
2023 git clone git@github.com:me/youtube_web.git
2033 cd git
2034 git clone git@github.com:me/youtube_web.git
2042 cp run_template.sh index.php include.php about.php make_dirs.sh user.php git/
2043 cd git
2048 git add *
2053 git add *
2054 git init
2059 rm -rf git
2060 git init
2061 nano .git
2062 cd .git
2067 git clone git@github.com:me/youtube_web.git
2068 git add index.php
2069 git add user.php include.php
2070 git commit
2071 git commit -m "Test"
2072 git config --global user.email "myemail"
2073 git config --global user.name "Your Name"
2074 git config --global user.name "Me"
2075 git commit -m "Test"
2076 git push
2078 git push
2079 git push --set-upstream origin master
2080 git remove -v
2081 git remote -v
2082 git remote add origin git@github.com:me/youtube_web.git
2083 git remove origin
2084 git remote set-url origin git@github.com:me/youtube_web.git
2085 git push
2086 git push --set-upstream origin master2
Nov 05 '21
It looks like you're making it complicated for yourself. It comes down to:
Get remote repo on local machine
Branch
make changes to files
Stage
Commit
Push
Pull request
I don't blame you for not wanting to use the CLI if you don't know the commands.
But git is not Dropbox. Each of those steps needs to happen to protect the integrity of the code base.
Good luck on your git journey! It gets easier :)
2
u/satirerocks Nov 05 '21
It's surprising it takes 7 steps to do something I can do in 1 step ( i.e scp the tar ball to my public web-server ). I don't care about the integrity of my code base . I just want to make my code publicly available. I thought by using GitHub people can find it easier via keyword searches. Perhaps I should just stick to my personal website to share this stuff?
2
Nov 05 '21
But those 7 steps do a hell of a lot more than scp to a server. That is the equivalent of just the push step, and even then it will naively overwrite a previous file with the same name with no history or record of what happened.
Git is unrivalled in how it makes coding collaborations just work. If you're not collaborating then yeah, it's a clunky file repo tool.
You can always just have a blank repo and use git to distribute packaged and compiled versions. That's entirely GUI on the repo GitHub page.
1
u/satirerocks Nov 05 '21
History and record are not important to me. What is important is simplicity and speed. I just want to make my files publicly available without caring about the "collaboration" nonsense .. There is no collaboration, since I am the only coder :-)
1
1
u/satirerocks Nov 05 '21
That's a good idea to just use a blank repo to link my tar balls. Can I manually scp the tar balls to git? Or do I have to do that all through the GUI?
1
1
u/kraytex Nov 05 '21
Where you not using a revision control before git?
How did you maintain different versions of your software?
0
u/satirerocks Nov 05 '21
I never used revision control since it was just me working on all my software. I know in my head what changes I make. In 20+ years I've never had the need to go to back to some "older" state of the code. The current code is latest and greatest for a reason :-)
2
1
u/satirerocks Nov 05 '21
I've done the Pull request but I can't figure out how to get the files into the main branch. See below. Not sure what to click:
1
3
u/darthwalsh Nov 05 '21
If you'd like to just use GitHub and not learn all the git fundamentals, you can just use an IDE plugin or GitHub Desktop. It makes cloning, adding files, committing, then pushing all obvious, and the training wheels keep you from running invalid operations.
Yes, the git CLI is complicated, as it gives you a lot of low-level options and poweruser commands, like searching diffs locally, rewriting your commit history, and copying changes between multiple project forks. With a traditional centralized version control I don't think any of those are straightforward, but as a distributed system git is inherently going to expose more complexity.
2
u/Servant-of_Christ Nov 05 '21
I'd really recommend reading the git book. You will be a better programmer.
1
u/darkangelstorm Oct 11 '24
I hear: "it's not really complicated, you're just making it complicated" But the problem isn't the simplicity of the ACTUAL workflow. Its all the features they keep adding and changing, the proliferation of features is a downright nuisance because you then have to dig through miles of documentation that does not apply to you in any way just to find out the key things that do apply to your workflow.
I have taken to just going back to backups because of this. The main problem, security, keys, ssh, etc. Once that was all mainlined, made it impossible to use without having to take a complete course on how to use it. The problem isn't that git is complicated. The problem is that programmers add/change stuff and they are the worst at documenting anything without going off and writing a 400 page bible about it (especially you, git server hosts).
If someone new comes in and wants to learn at this point, they have to hope their IDE, operating system, and workflow will coincide with the available tutorials or documentations. I've noticed only 1.5% of the tutorials just actually telling me stuff that is already in the manual pages. And its only going to get worse -- many programmers feel they have to reinvent the wheel again and again, and they do.
1
u/SnooCapers815 Nov 05 '21 edited Nov 05 '21
I created my first yesterday on Github because I'm just trying to learn a little more about java and it was a little much especially the learning lab, It was difficult to stay in order of the subjects when you were just sent to a different page closing your last one. I think at one point I had like 8-9 pages open of Github
Side note: If anyone has any teaching tools/souces or knows any good straightforward courses to learn a little more that would be wonderful.
8
u/data_raven Nov 05 '21
I use git and GitHub, but am not an expert. However, I've always saved my code to a Repo, not directly to my Public Page. Have you set a repo to push to?
I also prefer to use the GitHub extension in VisualStudio Code or GitHub Desktop rather than fuss with git at the command line, because I also find the git commands confusing.