>>20344
>I guess that's some kind of safety feature?
Since git is a version control software it intentionally makes it hard to lose "progress" if you stage and commit often, so that's why it doesn't let you overwrite changes easily. It would be poor design to easily/silently let you clobber files.
>commit/rebase
In git, a "commit" is basically a snapshot of the files at a certain moment in time with a message "yes, these changes are real" but you don't actually need to commit, you can delete the commit before pushing, but even if you delete only the files and not the commit, if they've been commited they're still safe. Pushing a commit to the remote (server) tells everyone else that the changes are real, you can easily remove a commit before you push it but if you try to remove it afterward pushing it it's a big hassle, since it's playing with "time".
A 'rebase' is what you'd do if you had diverging branches, say for instance you're working with someone else, you both pull from the latest commit, but you commit & push your work before the other person, since git is a sort of 'timeline' all commits come from every commit before, but you both started from the same point in time and now the 'timeline' is wonky, you'd have to rebase your changes onto the new branch. A rebase is a way to "easily" do that, but many find it confusing, I don't have a very good grasp of it either. You probably won't need to rebase if you're just pulling updates from a software repo, but if you're doing development work to submit changes upstream it may be necessary.
>stash
'git stash push' adds all uncommited changes to a sort of side place, the stash, useful if you have important work but it's not done/you don't want to commit it yet. 'git stash pop' returns the files from a stash, and deletes the stash (just the one you popped) undoing a 'git stash push'. Think of the stash as a "fake commit" that is technically temporary. You can also easily delete it with a 'git stash drop stash@\{#}' where # is the stash number you want to delete without saving
>roll back
As for rolling back an update, say for instance hydrus v534 was bad, you found out before you started the database and upgraded to v534, to "roll back" to 533 you would need to use "git checkout", it can be used for branches as well as commits, so to checkout branch "test" you'd use 'git checkout test'. To checkout a specific commit there's a couple things you can do, you could use the reference, an exclusive sha-1 hash of a certain commit, Hydrus v533's first release has reference '8b3ae4ac1a006e955addefb7a8af47a4e2b6336c' so you'd 'git checkout 8b3ae4ac1a006e955addefb7a8af47a4e2b6336c '. You can also use the shortref, a truncated version of the hash for that commit, which would look like 'git checkout 8b3ae4ac'. If the commit is more recent, say it was the second to last you could go off of the HEAD position (the most recent), so you could 'git checkout HEAD^^' for 2 commits up. You can also use 'HEAD~#', where # is the number of commits up, so you wanted to go 11 commits back instead of typing 11 carets you'd just 'git checkout HEAD~11'
You can /also/ use the tag, if a developer uses them, hydrus thankfully does so all you'd need to do is a 'git checkout v533' which is actually a different commit since v533's initial release had a hotfix for a type check.
>In this case all I'm "merging" on my end is the chmod +x I set on those 1 or 2 files, right?
If there's no other files listed when you try to pull the latest update, yes. You can run 'git status' to see what files have changed.
This kind of turned into a git seminar holy hell, I'll wrap this up.
If you want to read more about git you can check out the pro git book, it was helpful when I was trying to set up a git repo on my server.
https://git-scm.com/book/en/v2
Message too long. Click
here
to view full text.