3 ms·
Git is a tool for manipulating graphs of states. You can traverse them (checkout), create new snapshots (commit), make and update pointers (tag and branch), cal
by seba_dos1 4y ago
Git is a tool for manipulating graphs of states. You can traverse them (checkout), create new snapshots (commit), make and update pointers (tag and branch), calculate diffs and reapply them across different snapshots (rebase, cherry-pick, merge), and synchronize your graph with other repositories (push, fetch).
Git commands and UI are just tools to let you work on this data structure. You should think in graph of commits first, and only then in commands that allow you to execute your plan. Like with any other data manipulation tool, there are often multiple ways to achieve the same thing.
You may want to spend some time with https://blinry.itch.io/oh-my-git https://blinry.itch.io/oh-my-git - when you can actually imagine the data structure you're working on, it becomes obvious that rebase is nothing else than automated cherry-picking.