He is. He said he had to use a cheat sheet every time.
I just press the green button in my IDE
Or just use a gui like github desktop.
Fuck remembering commands when you can just click.
If you have the right permissions, you can use --force to get past a lot of issues with git.
git add .
git commit -m 'bug fix and stuff'
git push origin master --force
wow brb bro gonna go do this on one of the repos at my job
Also, don't forget the good ol' git branch -D main
What's hard to remember about git push
?
terminal scary
It’s all and great until you’re a few commits behind and merge conflicts happen…
fatal: The current branch has no upstream branch
git config set push.default simple
git config set push.autoSetupRemote true
Set it and forget it.
More good config suggestions here.
I have several ideas why that might not work.
In all these cases git push
won't help you, as a single command.
This why terminal scary
conflict merge
Sounds like you are working on a small project by yourself. When you are working on larger projects with multiple people you can't just git push
by itself.
Sounds like you work on projects where you just push to main without a well-defined code review/merge process.
Sounds like you work on projects where you just push to main without a well-defined code review/merge process.
You don't just do git push to merge a branch.
GitHub desktop or VSCode built-in Git extension. Never had to write a command
i'm so lazy that once the CLI stopped working for me I just used the github website.
i did google the problem, though. i think i had to delete an old password from the keychain but i couldn't figure out how to do that. like i could literally see what to click on but i couldn't click it
People like terminal because they think it makes them look smart.
I never used and never will, there is a reason we moved from msdos to windows.
How else were we gonna play GTA 6?
Hahahaah good one
Not every computer has a gui, especially servers. Also not every ide has buttons for using git. So if you want to have version control on a remote server you need to use cli/terminal
If you are commiting from a server, I'm sorry,
There is GitHub desktop which is freem
Whoever is programming on a remote server, I'm sorry for you..
I program on a remote machine. It's fantastic and has literally hundreds of times better hardware than my laptop. I can WFH and literally program on a beach and have all the hardware I want and not step a foot in an office. It's all mostly done through ssh and CLI because remote desktop software is pretty slow and clunky.
You should try it it's great.
It's awesome but it's clunky ?
Remote desktop software is clunky. They're using SSH, which is a terminal-based remote access program.
Remote desktop software is clunky and slow.
Using the command line is fast and awesome
Maybe use remote desktop in command line with ASCII drawings then.
Also , go back to the 80s and pretend you are smart
I'm not trying to be holier than thou.
I'm saying you should try programming remotely - it's pretty neat
There is no reason I would try such BS if I already own a decent machine. Which I can use through parsec or moonlight if I want to program remotely.
Moreover, both would support GUI for git and i would never use command lines.
In the end , it's always this. Programmers screwing themselves because they can
"Your (programmers) Were So Preoccupied With Whether Or Not They Could, They Didnt even think if they should"
Github desktop is not officially supported on linux, so unless you're using git exclusively on windows and Mac it's not an option. Maybe it's a strong opinion but the need for a gui application to have version control seems way too big of a crutch for me. As a programmer a basic understanding of the terminal is (at least in my experience and opinion) expected, the need to click through menus seems unnecessary and a waste of time compared to using the terminal. And git cli is universal, gui applications for git are not.
Your opinion is fair. You can decide not to use a GUI.
I don't feel it's a big crutch. Git GUI are plentiful under any platform. And they simplify a lot of the daily commands to do. I used both command line and GUI, and I find GUI much quicker to commit stuff, rebase, solve merges than using the CLI. But I use Fork now, because Github For Desktop was a hassle with many advanced functions and GitKraken was too complicated for me.
To me, writing out the commands for git is slower than clicking 3 buttons (stash all, and commit, and push). Not to mention learning the in-depth stuff or how to fix git issues using CLI.
If you’re using Linux, you’re a command geek anyways
Yeah, my view is biased however at my university we were also taught the basics of git with the command line even though most users were using windows. Though some people still used the ide commit and push afterwards
As a programmer, basic understanding of terminal is just bullshit. We just need to get thing done with the least effort.
Anything you add because you feel like you should use it know is just for your ego
I use terminal because it's the environment that is most comfortable and convenient to me. In a job, it's also very common to dev/deploy/test on remote servers, so that terminal might be your only choice.
Some people apparently have a fear of commitment. But seriously: learn the commands by using them!
sourcetree
I'm even worse than that guy. I use the tool in visual studio
VSCode UI does the important stuff for you
There are a ton of git clients out there. I used SourceTree when I started, and it eased me up into git since it also displays the commands it uses to fetch, checkout, create pull requests, prune, rebase, etc.
It's been a long time since I actually laughed out loud on this sub. Nice one!
I get why people are uncomfortable with it but it's like everything else. The more you use it the better you get with it. If you let yourself use one of the graphical apps to do git for you, you won't ever learn how to use the tool.
pwd git status git add —all git commit -m “I love git” git push git status
I want to share this at work, but probably not appropriate.
3 git command to remember.
Git add
Git commit
Git push
Everything else look up on the internet as they come up.
git add, git commit -m, git push -u origin main
The only thing more scary than a CLI e is a GUI client, apparently. Its like were still in the 90s
Hot Take: I think using the command line for git is trash and should be left to experts, and everyone else should just use a GUI.
Hear me out. It's just like with any technological advancement and helper software. Sure, you can do everything from the command line. But it's not intuitive, it takes more effort to learn, and it does not provide a significant advantage for the average programmer compared to a GUI. Why stop others from having it the easy way?
I also heard some people say "You should start coding using notepad, that way you won't have the IDE as a crutch" and I think it's a silly advice. Just find a good GUI for git. The day something goes wrong that you can't use the GUI for, then open the command line and google for a way to fix it. Until then? Screw that, use a good GUI.
It's 100x easier, more convenient, quicker, and it does allow you to do a whole lot more than the command line IF you are inexperienced in git! Resolving merge conflicts through the command line sucks ass. Doing it through a GUI? Super easy and understandable, even as a beginner.
So yeah. Just use a GUI. And while I'm here, skip GitHub for Desktop.... Go with Fork. Fork is awesome.
git rebase -i
is the only command you'll need to know other than commit and push
git stash
git switch
git restore
...
git pull
rebase is dirty
I love this gif