Git is useful for anyone who writes code or tracks changes to files, from web developers to app developers. So, what exactly is it, and why should ...
For further actions, you may consider blocking this person and/or reporting abuse
I believe you did an excellent job explaining Git and its main components. Their list of 10 essential Git commands is very valuable for beginner developers.
This is good article, but also beside this, I think it's important to understand and different things you need to do on local computer (own laptop) and GitHub.
On this link it's little bit explained that things: local computer vs GitHub
Completely agree! Thanks for valuable sourceππ»
Thank you so much, Sergey!
awesome article, but i would also add git fetch
Good Job!!
I agree that with these commands you can live a whole life with git (if you are lucky, at least). I saw that someone else mentioned
git switch
, but I'd like to chime in on that command. The purpose ofgit switch
is to switch between branches, or create new branches. All you can do withgit switch
you can do withgit checkout
, butgit checkout
has a lot more use-cases so it is like using a sledgehammer for small nails! :)A couple of commands I've been using a lot since they came out, is
git switch [-c] <branch>
to switch to another branch (or create one with -c), andgit restore <files>
for restoring working tree files. Adding--staged
togit restore
will just restore the index, i.e. un-stage files.These two were introduced so there's a distinction between switching branches and restoring the index, which can be achieved by the
git checkout
command.Hey ! I would replace
git init
withgit reset
(because you already havegit clone
). Hard to live without it.If you want to create an alias named "lg" that shows a history of all commits, you could use the following command:
thank you
Wish I could figure out how to use my VS Code interface to correctly use my repositories.