3 ms·
There's also `git pull --rebase`, which is just "pull like normal, then rebase onto the thing I just pulled". Remember that it's okay to screw around and break
by blep_ 4y ago
There's also `git pull --rebase`, which is just "pull like normal, then rebase onto the thing I just pulled".
Remember that it's okay to screw around and break stuff! Sometimes that's the best way to learn. Git's whole thing is tracking history, even the history of the history itself[0]. It is hard to accidentally lose something if you've committed it at least once.
If you're nervous, push your branch somewhere before starting (it's not strictly necessary, but it's the easiest way to get peace of mind).
Nothing you do locally will be pushed back to the remote unless you explicitly do `git push`. If you manage to screw up your branches so badly you don't know how to recover, you can just delete the local branch you broke and re-pull the remote one like it's a new branch, even if it's main/master.
[0] https://ohshitgit.com/ https://ohshitgit.com/, especially the first thing there