2. Main: When you create a new repository, it comes with a default development branch.
Last time I checked, the default branch was still called master. Calling it main instead is really just a weird thing that github does by default.
git commit -m "added index.js file"
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.
Suhail is a software developer specializing in full-stack web and mobile application development. He is interested in contributing to open source and building Web3 applications.
Suhail is a software developer specializing in full-stack web and mobile application development. He is interested in contributing to open source and building Web3 applications.
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.
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 used main 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 called potatoes.
Suhail is a software developer specializing in full-stack web and mobile application development. He is interested in contributing to open source and building Web3 applications.
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 :)
Suhail is a software developer specializing in full-stack web and mobile application development. He is interested in contributing to open source and building Web3 applications.
Last time I checked, the default branch was still called
master. Calling itmaininstead 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 commitand write a proper commit message.Yes, I agree but since I was talking about GitHub, I mentioned
mainas 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 termsWithout 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 mainGreat 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
masterbranches on github and people have occasionally usedmainlong 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.