As a developer, we all know a little about Git and GitHub but there are some developers who still have doubt and question about Git and GitHub. The...
For further actions, you may consider blocking this person and/or reporting abuse
Last time I checked, the default branch was still called
master
. Calling itmain
instead is really just a weird thing that github does by default.Please don't... That's such a bad habit and sooo many newcomers are doing it because all the tutorials say so. Use
git commit
and write a proper commit message.Yes, I agree but since I was talking about GitHub, I mentioned
main
as default branchYes, but your title says "Git and Github" so it seems worthwhile to point out that there's a difference and which uses what :D
Yes, it is , but as you see the heading it is
Basic GitHub terms
Without mentioning the git default, it's a bit misleading though. It makes sense if you already know git anyway, but that's not who this post seems to be for though.
You may want to update your installation and documentation setup material. As @darkwiiplayer mentions, Git defaults to master. Since GitHub, GitLab, Atlasssian, and most new training material refers to main, it would be a good idea to use the same standard.
Could you add this to inform your readers?
git config --global init.defaultBranch main
Great article!
More than just point out how to change the config, I think it's important to explain that both standards exist and where they're used. There's still lots of
master
branches on github and people have occasionally usedmain
long before any big platform made the switch. I'm sure there's at least one repo somewhere out there where the default branch is calledpotatoes
.Sure Bill, Thanks
Thanks!
Hey , do learning git commands worth in 2021 ? Whether you can use the git GUI ?
I mostly use the UI as a single developer with the occasional collaborators, but the command line is very powerful, allowing you to perform more granular and feature-rich operations. It’s also useful if you spend a lot of time in a terminal window anyway.
All that said most of the basics, like cloning, branching, committing, etc are quite easy to learn with a UI. Actually, I learned the UI first, then when I wanted to do more advanced things, the GIT documentation made a lot more sense :)
It would be helpful if you understand how to use git commands.
Most of the cooler stuff git can do isn't really available from any GUI tools
Learning the basic commands is never a harm.
I would be better, if you learn git commands, and as @darkwiiplayer mentioned, most of the git features aren't available is GUIs
Show.