Getting started with Version Control

后端 未结 30 1713
星月不相逢
星月不相逢 2020-11-30 18:57

I need to implement version control, even for just the developing I do at home. I have read about how great Subversion is for the past couple years and was about to dedicat

30条回答
  •  春和景丽
    2020-11-30 19:40

    @superjoe30

    What about using source control on your own computer, if you're the sole programmer? Is this good practice? Are there related tips or tricks?

    I find git is actually easier for this as you don't need a server or worry about entering URL's and so on. Your version-control stuff just lives in the .git directory inside your project and you just go ahead and use it.

    5 second intro (assuming you have installed it)

    cd myproject
    git init
    git add * # add all the files
    git commit
    

    Next time you do some changes

    git add newfile1 newfile2 # if you've made any new files since last time
    git commit -a
    

    As long as you're doing that, git has your back. If you mess up, your code is safe in the nice git repository. It's awesome

    • Note: You may find getting things OUT of git a bit harder than getting them in, but it's far more preferable to have that problem than to not have the files at all!

提交回复
热议问题