I have a bash script that I've written during the course of the last week. Today, I've decided to finally give git a try before making any further changes, created a git repository, etc.The script has two versions: script.sh and script1.sh. My question is whether there is a way to tell git that the latter is an updated version of the former? I've read the beginner chapters of the git book about 3 or 4 times now and I'm a little shaky on terminology, still. I don't think that merge is what I'm looking for. I've committed both of the files, but from what I understand that just means that they are two separate files of a project to be tracked. From now on I'll just be editing one file with its changes tracked, but is there a way to neatly preserve my work in the version control system from the pre-git days? Or am I imagining a function that isn't there? I hope my question isn't as confusing as I am confused right now! Thank you!
git: how to add one file as a version of another?
git;version control
Yes, you overwrite script.sh with script1.sh, after an initial commit. Starting from scratch:git initgit add script.shgit commit -m First version of script.shmv script1.sh script.shgit add script.shgit commit -m Second version of script.shYou'll then be able to see both versions of script.sh in git log, check out the previous version etc.