我有以下方框:
构建和运行我的项目所需的编译器和硬件都只在机器B上.
我想使用Eclipse CDT从该项目的Windows框中"透明地"工作,并能够在IDE中远程构建,运行和调试项目.
我如何设置:
rsync,然后调用远程makefile来启动实际构建?Eclipse托管构建是否具有此功能?我有我的回购@github.我在家做了一些工作并把它推到了github.它涉及一些文件和目录的删除.现在我在我的工作箱上,它在删除文件和目录之前有一份代码副本.
我发布了以下内容:
git remote update
git checkout HEAD
git pull origin HEAD
Run Code Online (Sandbox Code Playgroud)
它删除了它应该拥有的所有文件,但没有删除文件所在的目录.
两个问题:
是否有一个Git命令(或一小段命令)可以安全可靠地执行以下操作?
目前我坚持:
git fetch -p
git stash
git stash drop
git checkout $branch
git pull
Run Code Online (Sandbox Code Playgroud)
但它困扰我,因为我要求密码两次(由fetch和pull).通常我会对任何解决方案感到满意,只要密码只需要一次即可.
几个笔记:
我试图git pull origin master从我的服务器做一个但不断收到错误:
Please move or remove them before you can merge.
没有未跟踪的文件,但由于某种原因,它似乎与被忽略的文件有问题.
我尝试运行一个git clean -nd以查看将被删除的内容,并列出了一大堆被忽略的文件.gitignore.
我怎么能解决这个问题呢?
我只是想拉.我有更改无视,我的Gemfile和Gemlock文件,我很乐意只是覆盖它们而只是拉.我试着把我的变化藏起来,这对我来说没有用.我该怎么办?
git pull
M Gemfile
U Gemfile.lock
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
~/projects/sms/apps2/apps2_admin(apps2)$ git stash save "saved"
Gemfile.lock: needs merge
Gemfile.lock: needs merge
Gemfile.lock: unmerged (4ea16799dba7bfe1db28adecf36dee1af5195c1a)
Gemfile.lock: unmerged (e77439c9f86d1d0eda7ae0787e3e158f90959e68)
Gemfile.lock: unmerged (d690d3860db1aa8e46c1bb2f4de3e52a297b5c26)
fatal: git-write-tree: error building trees
Cannot save the current index state
~/projects/sms/apps2/apps2_admin(apps2)$ git pull
M Gemfile
U Gemfile.lock
Pull is …Run Code Online (Sandbox Code Playgroud) 我试过了两个
git update-index --assume-unchanged config/myconfig
Run Code Online (Sandbox Code Playgroud)
和
编辑.git/info/exclude和添加config/myconfig
但是,当我做git pull时,我总是得到:
更新0156abc..1cfd6a5错误:对以下文件的本地更改将被merge覆盖:config/myconfig请在提交之前提交更改或存储它们,然后才能合并.中止
我错过了什么?
我遇到了问题git clean.考虑以下场景
git status -su
?? file_1
?? xyz/file_2
git clean -f
Not removing xyz/file_2
Removing file_1
Run Code Online (Sandbox Code Playgroud)
我不想删除xyz文件夹,但想删除file_2里面的文件夹.为什么git clean不递归工作?
我的同事将生产修补程序的一些更改合并到他的本地主分支中,然后将主服务器推送到我们的GitHub存储库.现在我尝试用他的更改来更新我的本地主分支.当从git控制台执行"git pull origin"时,通过显示所有文件似乎可以正常运行.但是,接近结束时它只是停止了"Aborting"消息.
我不知道接下来该做什么.救命?
更新: 问题解决了.问题的真正根源是我的同事从他的分支中的.gitignore文件中删除了一些条目,这些条目允许几个新文件进入他的签入.由于我的本地.gitignore仍然忽略这些文件,我的本地仓库并不认为我有本地工作文件要添加到索引中.我最终删除了所有文件,然后拉动工作并将它们全部带入.
我肯定会更仔细地编辑.gitignore文件并将其检入.我现在对其对其他开发人员的影响有了新的认识.
我不是谷歌的专家.不用说,我甚至不确定这意味着什么或如何解决它?
>> git merge admin_playground
error: Untracked working tree file 'vendor/gems/panda-1.0.0/.gitignore' would be overwritten by merge.
fatal: merging of trees 538b2824765956cc44c42a8ad628e4f4 and d5d4cda68518cd1c81bf70ba8c339fea6 failed
Run Code Online (Sandbox Code Playgroud)
我正在尝试执行git merge并获取此失败的语句.
当我git pull origin development,我得到错误:
error: Untracked working tree file '<path-to-file>' would be overwritten by merge
Run Code Online (Sandbox Code Playgroud)
原因是因为remote development branch在我的本地项目中没有放入git中的一个文件(我不想在版本控制中使用该文件,所以也是如此git rm).但是remote development,该文件是版本控制的退出
如何解决这个问题?基本上,我希望远程分支也从版本控制中删除文件.
git ×9
git-pull ×3
git-clean ×2
github ×2
branch ×1
c ×1
deployment ×1
eclipse ×1
eclipse-cdt ×1
gem ×1
git-checkout ×1
git-merge ×1
git-stash ×1
git-svn ×1
merge ×1
repository ×1
ssh ×1