暂时保存Git [英] Saving Git changes temporarily

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

问题描述

git-stash 我想探索的是什么?假设我在我的笔记本电脑上处理我的项目,但我需要将我迄今为止完成的工作转移到我的桌面上。两台PC都同步到一个集中的GIT仓库。我不想提交我的更改,但我想从其他PC上删除。

> git-stash 只能在本地保存更改。你不能在另一台机器afaik上发送更改。



你想要创建一个新的分支,进行必要的更改,将其推送到远程,在您需要它的机器上分支。


Is git-stash what I want to explore? Say I work on my project on my laptop but I need to transfer what I've done so far onto my desktop. Both PCs are sync to a centralized GIT repo. I don't want to commit my changes just yet, I want to pick up where I left off on a different PC.

解决方案

git-stash only saves the changes locally. You can not send that change on a different machine afaik.

What you want is to create a new branch, make the required changes, push it to remote, and pull that branch on the machine where you need it.

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

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