如何从两个系统工作在同一个github repo上? [英] How to work on same github repo from two systems?
问题描述
该代码作为私人回购托管在Github上。我正在考虑在Dropbox中使用这样的裸回购:
Github
|
Dropbox(裸回购)
/ \
台式机笔记本电脑
我试图避免在我的回购库中存在大量虚假签入,以便代码在两个系统之间共享。我测试了这一点,它似乎工作分享代码,但我认为所有的签到仍然会堆积在git日志中,当我不得不从dropbox推到github时。
所以我的问题:
- 有没有办法编辑提交(即时想像的东西像压扁一堆提交到一个)之前推从保管箱裸回购github?
- 我应该将工作目录放入Dropbox(从github克隆)然后使用那里的代码吗?
完全跳过Dropbox。相反,当您准备合并到 工作流程如下所示: 你已经准备好与 I work on multiple systems throughout the day. I've been trying to figure out a strategy to sharing my current working directory between the two systems. The code is hosted on Github as a private repo. I was thinking of using a bare repo in dropbox like this: I'm trying to avoid having tons of bogus checkins in my repo just so that the code is shared between the two systems. I tested this out, and it seemed to work to share code, but I'm thinking all the checkins will still pile up in the git log when i have to inevitably push from dropbox to github. So my questions:
Skip Dropbox entirely. Instead, use topic branches for work in progress, then The workflow would look something like this: When you're ready to merge with 这篇关于如何从两个系统工作在同一个github repo上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! master $ c $>时,使用主题分支进行工作,然后
rebase
或以其他方式改善您的历史记录
git checkout -B< topic> master
< topic>
之外的代码。在任何你想要的状态下随时提交。
git push origin < topic>
< topic>
并跟踪它: git checkout --track origin /< topic>
或 git pull origin< topic>
它已签出。
master
或 production
合并,使用 git rebase -i
给
< topic>
一个逻辑的,可调试的,可维护的历史记录。 Github
|
Dropbox(bare repo)
/ \
Desktop Laptop
rebase
or otherwise improve your history when you're ready to merge to master
.
git checkout -B <topic> master
<topic>
. Commit as often as you'd like, in whatever state you'd like.git push origin <topic>
<topic>
and track it: git checkout --track origin/<topic>
or git pull origin <topic>
if you already have it checked out.master
or production
, use git rebase -i
to give <topic>
a logical, debuggable, maintainable history.