English 中文(简体)
Aptanana 3 和 Git: 转换分支代码不变。 我不能尝试添加新特性
原标题:Aptana 3 and Git: switching branches code remains the same. I cannot try to add new features

我最近才开始使用Git和Aptana

读到一些关于Git的东西,我发现我可以创建新的分支。我可以和Aptana一起做到这一点。

但我明白,如果我创建一个新的分支,我有一个单独的环境,我可以在其中工作而不照顾我所做的改变,因为这些改变不适用于我的主要源代码。

因此,我期望,如果在阿普塔纳,我转换了分支, 我打开的文件应该是特定分支的文件。

So if I have the file "A" with "some content" in the master branch, if I create a new branch (call it "testBranch") and edit the file "A" writing into it "Some new content", if I switch back to the master branch and open the file A it should contain again "some content".
If I open the same file from the testBranch, instead I should find in it "Some new content".

Instead, using Aptana, I see the modified file also if I switch between branches.
But I think isn t this the way git s developers thought the tool.

我认为,如果我在master 分支文件“A ”中包含“某些内容”,而如果我切换到“testBranch ”文件“A”中包含“一些新内容”。

我错了吗 有什么我误会的吗

最佳回答

如果您修改了一个文件, 但并未执行, Aptana 在切换分支时不会修改它( 即检查另一分支 ) 。

但如果您已经在当前的分支中( 在切换前) 投入了该文件, 而内容没有变化, 那么它可能与这个错误有关 : “ < a href=" https://aptanastudio.tenderap.com/discussions/ problems/ 2599- git- checkout- from- gui- app- explorer- sometimes- doesnt- checkout- branch" rel=“ nofollow” >Git checkout from GUI (App Explorer) 有时不会退出分支 。

问题回答

有了同样的问题, 我决定创建分支, 并使用 Bash( 命令提示) 转换为它, 然后因为我正无处可去, 并且 Aptana 仍然得不到它。 我决定重新启动 Aptana ( 关闭我项目的所有实例), 然后在重新开始时, 新的分支是可用的, 但是它是我的工作空间指向 HEAD 。 回到命令提示并运行 $git 状态, 查看在重新启动前我的 $git 分支检查 // 指令中的哪个分支 及其新的分支 。 请选择新的分支和您的好坏去 。





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签