Part 4: Git most useful commands - git diff, git merge, git push, git show, git checkout #DevRel

preview_player
Показать описание
Git is used on most projects. Here is part 4 of the 10 most useful git commands

With these commands you can: see your changes, undo changes, merge changes between branches, push changes to GitHub (or another remote) and more...

What would you like to see next?

Part 4: Git most useful commands - git diff, git merge, git push, git show, git checkout #DevRel

Don’t forget to support my channel by subscribing below, it’s free, and also share with your friends. Subscribe now!!

Follow on other socials for behind the scenes footage, join discord to continue the conversation...

Рекомендации по теме
Комментарии
Автор

It's refreshing to see these commands because I use the GitHub Desktop tool on everything (basically 😅). Although to create tags (git tag) for releases I don't use a GUI or the browser, but the command line instead. I find using a tool speeds up a lot of my development, but it's very important to know how to use these commands like you are showing

davidpereira
Автор

Sounds like a great video again, Great Eddie :) :)

thejasong
Автор

My favorite "git" commands of the day are ssh-agent and ssh-add so you don't have to keep retyping your ssh key's passphrase. :P

majorgnu
Автор

I have to say that I'm not a big fan of teaching by example when it comes to git.
I think the key to really getting git is understanding its fundamental data structures and concepts. Then git commands lose their "mystery" as you can easily reason about them as fancy operations on git's internals.

All you need to know to understand git's internals is this:
- cryptographic hash functions (SHA-1)
- directed graphs
- content addressable storage

There are only three fundamental data types, the three main git object types: commit, tree and blob.

Everything else is built around those and can usually be described in relation to them:
- ref: a reference to a git object by way of its SHA-1 hash, usually a commit.
- symbolic ref: a ref that points to another ref instead of directly pointing to a git object
- branch: a named ref usually meant to change in time.
- tag: a named ref usually meant to stay the same
- tag object: The fourth kind of git object. A pointer to another git object with some additional metadata. Usually points to a commit.
- lightweight tag: a tag that points directly to a non-tag object.
- index: the prototype for your next commit's root tree.
- repository: a set of git objects, refs, configurations, etc. stored in a git specific format, usually under a .git directory.
- remote: a different repository, known to the one you're currently working on.
- remote branch: a "read-only" cache of the last known state of a remote's branch. Just another ref.
- etc. I'm getting too close to being complete for a YouTube comment at this point.

But the absolute worst thing to do when learning git IMO is using a git "app" that tries to create its own abstractions and metaphors on top of git.
That's an express ticket to Twisted Informal Mental Model Station.

majorgnu
visit shbcf.ru