Git + GitHub + Dropbox [英] Git + GitHub + Dropbox

查看:108
本文介绍了Git + GitHub + Dropbox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是git和GitHub的新手.到目前为止,我已经成功设置了环境,以便可以通过git程序将提交推送到GutHub.

I'm new to git and GitHub. This far, I managed to setup my environment so that I can push commits to GutHub via the git program.

我拥有两台计算机,它们使用Dropbox共享文件.那也是我保留我的开发项目的地方.我想知道的是:是否可以完全使用git,GitHub Dropbox? 我阅读了使用git和Dropbox 而无需逐步浏览GitHub的指南.

I own two computers, which share files using Dropbox. That's where I keep my development projects too. What I wanted to know is: is there a way to use git, GitHub and Dropbox altogether? I read guides to use git and Dropbox without stepping through GitHub.

在一个实际示例中: 说我在笔记本电脑上的项目文件夹中(项目文件夹在Dropbox上).我git push origin master,一切顺利,在GitHub上进行了更新. 现在在我的桌面上,我有了通过Dropbox同步的更新文件.

In a practical example: say I am in a project folder on my laptop (the project folder is on Dropbox). I git push origin master and everything goes fine, updated on GitHub. Now on my desktop I have the updated files, synched via Dropbox.

我还是应该git pull来自GitHub的最新版本吗?

Should I git pull the most recent version from GitHub anyway?

许多人认为我在问如何与Dropbox一起使用git.我不是.

Lots of people think I'm asking how to use git along with Dropbox. I'm not.

我要问的是如何将您的工作保留在Dropbox中,仍然使用git ,并且有时仍可以推送到GitHub.

What I'm asking is how to keep your work inside Dropbox, use git anyway and still be able to push to GitHub sometimes.

推荐答案

好的,我将其分为几个组成部分:

OK, I'll split this up into its constituent questions:

1.我仍然应该使用git pull吗?

1. Should I use git pull anyway?

如果这两台计算机是您用来修改此代码库的唯一计算机,并且没有其他人将其推送到远程存储库,那么在这种情况下,没有理由(除良好实践之外)运行git pull.您的Dropbox正在执行保持代码同步的工作,而Github将为全世界提供您的代码.

If these two computers are the only ones you use to modify this code base, and nobody else is pushing to the remote repository, there'd be no reason (other than good practice) to run git pull in this instance. Your Dropbox is doing the job of keeping your code synchronized and your Github will be serving your code to the world at large.

2.怎么git push?

2. How to git push anyway?

Dropbox不会对此造成影响,您的.git文件夹和.gitignore文件是定义将要推送内容的组件.除非您尝试在Dropbox同步作业的半途中尝试git push,否则Dropbox在整个过程中都是不可见的,在这种情况下,您可能会遇到一些一致性问题.

Dropbox won't affect this, your .git folder and .gitignore file are the components which define what will be pushed. Dropbox will be invisible to the whole process UNLESS you try to git push half way through a Dropbox synchronize job in which case you could end up with some consistency issues.

3.有什么好处吗?

当您使用Github时,我不认为Dropbox在这里能给您真正的帮助.话虽这么说,但我使用与NAS驱动器连接到家用计算机的类似设置,我只是使用svn(我一直打算移至bzr,但一直没有这样做)来更新我的计算机. m在路上.

I don't think Dropbox really gives you very much here as you're using Github. Having said that, I use a similar setup with a NAS drive connected to my home computers, I just use my svn (I've been meaning to move to bzr but keep failing to do it) to update when I'm on the road.

这篇关于Git + GitHub + Dropbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆