git - 用git备份代码的好方法

标签 git backup

我刚读过 Version Control is not a BaCkUp system (pdf)。

而且我想知道是否有一种好方法可以在一天结束时将我的代码备份到远程服务器(以防我的笔记本电脑出现问题),而我所有的临时更改绝对不应该提交。

最佳答案

如果您在远程服务器上有一个私有(private)仓库,您可以提交所有内容,包括不好的东西,然后第二天您用好的东西更新您的仓库,可能会重置您前一天的一些工作。这只是一个想法。或者使用 dev 分支,只将好的提交 merge 到 master 中。如果你有一个私有(private) repo ,这将不会被任何人看到。许多地方都提供免费的私有(private)存储库,例如 baregit.com 或其他地方。

关于git - 用git备份代码的好方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14053893/

相关文章:

git - 如何将一组提交从 master 移动到单独的分支?

mysql - 进行 MySQL 大型数据库导出的最佳方法

.net - 归档平面文件的理想选择

database - SQLite 错误 : Expression tree is too large (maximum depth 1000)

git - Sourcetree/git 不显示关闭的远程分支

git:如何重新配置​​ git 以使用亮红色和亮绿色?

git - 如何避免在 Codemagic 中从 git 触发构建

克隆后 Android Studio 布局编辑器不起作用

php - MySQL,输出文件 : Is it possible to store query result into a variable instead of a file

ios - 如何以编程方式为我的 iOS 日历和 iOS 中的提醒创建备份?