我用Github来做mac, Github提供的 GUI 来做 GIT 提供, 然后我又在历史中恢复了承诺。 然后,我决定要再做一次,. 长话短说, 我有一些没有必要的复位, 不想和 Github 同步, 但是它们自动被执行, 所以我唯一的选择就是同步。
难道没有办法无视这些变化吗?
我用Github来做mac, Github提供的 GUI 来做 GIT 提供, 然后我又在历史中恢复了承诺。 然后,我决定要再做一次,. 长话短说, 我有一些没有必要的复位, 不想和 Github 同步, 但是它们自动被执行, 所以我唯一的选择就是同步。
难道没有办法无视这些变化吗?
似乎目前没有办法通过GUI... 希望Github的好人会看到这一点,
现在我们只能按照上述注释中推荐的 Tass 行事 。 git 重设 & lt; 承诺您要重置为 & gt; code>
以下是一些关于MacGUI GitHub的GitHub可以做的:
A 。 右键在您在本地回覆中做出承诺后, 但在同步 em> 之前, GitHub for Mac 将允许您 < 坚固> 解开您上次的 坚固> 。 在修改窗体底部使用“ 撤消” 按钮。 这是我最常用的 。
B 同步后, 您可以从 GUI 中 < 强度 > 反转一个承诺 < / 强度 >, 具体如下: 选择您的仓库, 然后选择“ 历史 ” 。 最后选择最后一个承诺 。 在最上方的详细承诺视图( 文件 diff) 中, 您可以看到一个“ 设置” 工具图标。 它有一个下调菜单, 带有条目“ 撤销此文件” 。 见下文。 请注意, 这不会删除您的承诺, 但是它有效地撤销了您承诺带来的更改 。
C。如果您选择一个较早的承诺(即比上一个更早的承诺),您可以使用相同的菜单来“返回到此提交 < / 更强 > ” 。再次,这并没有删除您的承诺,而是引入了具有取消承诺效果的更改。
这仍然是可以通过 GUI 完成的最好方法。 如果您真的想要从历史中删除您的过去承诺, 您仍然需要使用命令行 : 例如 : < code> git rebase - i HEAD~ 2 < /code > 将允许您将您最后两个承诺合并成一个 。 见 < a href=> https:// stackoverflow. com/ questions/51890/ squash- my- last- x-commits- comlist- using- using- git" 。 这个问题的答案 < / a > 用于指导 。
D. 请注意,一旦您从命令行中压平了承诺,您就可以使用 (A) 重新打开 GUI 上一个承诺(即壁球的结果) 。
""https://i.sstatic.net/5qFGn.png" alt="此处输入图像描述"/ >
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. ...
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 ...
I have a svn repo with various apps as subdirectory of a single svn repo. That worked because I could have checked out a partial, repo. As I cant do that with git obviously I need multiple repos. I ...
I understand how to merge branches together in git, and I love how easy it makes it. I have a branch that looks like this: project/ |--subproj1/ | |---(files) | |--subproj2/ |---(files) A ...
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 ...
I get this on every git svn command I try. I am using git version 1.6.4.2 on OS 10.6 The initial git svn fetch works, and i can do further fetches after that, but they do not enter the log or update ...
Given I have a master branch and a other branch. In the other branch are files I don t want to commit (e.g. log files) so I ignored them in .gitignore. When I switch to the master branch, these ...
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 ...