Do I need a server to use git?

后端 未结 7 2228
北荒
北荒 2021-02-06 14:39

If I need to get access to my files on my home computer from work or whatever, do I need to have a network server and check-in the files on there?

If I\'m using g

相关标签:
7条回答
  • 2021-02-06 14:45

    There are a number of hosted solutions for Git repositories, including GitHub and Unfuddle.

    The wording of your question indicates that you might misunderstand what Git (and Distributed Version Control Systems in general) are all about. You might want to read the intro to Git at Unfuddle or an introduction to Git like the one here.

    0 讨论(0)
  • 2021-02-06 14:46

    Git is similar to subversion/sourcesafe, but it's design to be distributed. You could make one act as a centralized server, or you could just work between your peers. There's a few more model you could use, see mmc's links for more info.

    GitHub is available on the web, but I suspect you want something hosted at work and no open to the outside.

    0 讨论(0)
  • 2021-02-06 14:49

    You could use something like: LogMeIn (https://secure.logmein.com/home.asp?lang=en)

    for any other remote desktop access software.

    See this for more such softwares -> http://mashable.com/2007/09/07/remote-access/

    0 讨论(0)
  • 2021-02-06 14:50

    I love DropBox for this. www.getdropbox.com

    0 讨论(0)
  • 2021-02-06 14:51

    Since GIT is decentralized, you have a complete copy of your repository on each system. This leaves you flexibility to adopt a workflow for synchronizing your repositories that works for you. Given what you said in your question I would recommend one of two options.

    Synchronize your Home and Work repositories via ssh

    If your home machine and work machines are both accessible from the internet, then you can just ssh from one to the other and push pull changes to each local repository. So:

    1. SSH to your other machine (other being either work or home)
    2. Pull down any remote repository changes
    3. Push up any local repository changes.

    Synchronize your Home and Work repositories via central repository

    This involves syncing both your work and home repository changes with a third repository location, which can be either on a hosted service like Unfuddle or GitHub, or any web-hosting service that gives you ssh access.

    I prefer the second approach because it gives you a third copy of repository at yet another offsite location.

    0 讨论(0)
  • 2021-02-06 14:55

    Even though a central server may make things somewhat easier, you don't need one.

    At work, I use some scripts around git-bundle to synchronize my git repositories between machines that are not connected to networks in a way that they can access each other. For moving around the bundles, I use either e-mail or USB thumb drives. (The machines in question couldn't even access a common third machine via IP connections).

    0 讨论(0)
提交回复
热议问题