English 中文(简体)
我如何用it子处理档案?
原标题:How can I commit files with git?
  • 时间:2011-08-16 15:31:36
  •  标签:
  • git

None of the tutorials will help!
They all do that thing where they just assume I know what to do..

目前,我的终端窗口开始。

# Please enter the commit message for your changes. Lines starting
# with  #  will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       deleted:    httpdocs/newsite/manifest/cache/0a432970ba6491fe65dad60b012e5c95_louloumay2011en-1-4dea3186b7f7b.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0a61b5d7a9e97da78fe602e1ad41edb6_5-4dec7c3d57c80.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0afb6a7716a85d0de46cdd03bb30f75f_fifa_panorama_full_page-01_thu-4dea3d1a0e0f5.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0b3bc9be76a5d3e1e36af4b8dcf98658_free2-4df0e2e08761f.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0b6342913b8e599fac76da452af98ec5_si-feb-2009-1-4dea3d1abcb61.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0b9ddc587340f7744e03c4b2dafacf7f_lou-lou-winter-2009-cover-4dea3d1a9b1a0.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0bf64ff8fc22720b3da20d0730fa6a04_chatelaine-dec-2009-4dea3d18daa30.jpg
#       deleted:    httpdocs/newsite/manifest/cache/0bf664e03eb0a2255b69b02aed85add0_summumfeb2011-2-4dea3188766aa.jpg

but there s no way to know how to do what they say to do here..
http://learn.github.com/p/normal.html

它说的是:

我们只是打造我们的承诺信息,并退出编辑。

What does that mean?!
Just because you write the word simply doesn t mean it is simple..

当我开始打字时,他说“记录”或“证明”,有大约300份档案,我想用电来取代每一条线吗?

Help !

I would use their handy Mac application for this, but if it s over 20 files or so, it freezes up !
What s up with that??

最佳回答

当你操作<条码>git 承诺时,不作任何论证,就会打开你的违约编辑,以便你打上承诺的信息。 公布档案和公布编辑,将做出承诺。

它像你的缺席编辑是Vi或Vim。 当您的类型是V don t 开始插入模式时,就会出现“超级脚步”的原因——你必须首先打上i! 如果你不希望,你可以将其改为更简单的东西,例如:

git config --global core.editor nano

然后,你装上纳编(假定安装了!) 当你投入使用时,对于没有使用Vi等模式编辑的用户来说,这种分析更具有吸引力。

你在你的屏幕上看到的这份案文只是要提醒大家,你将再次作出承诺。 前面有<代码>#,意思是它们重新发表意见,即,在你挽救承诺信息时,Gite忽略了这些内容。 没有必要打上每份文件的信息,只是进入编辑的顶端。

绕过编辑,你可以提供实事求是的信息,例如:

git commit -m "Added foo to the bar"
问题回答

页: 1 现任编辑

  1. press Esc
  2. type ":wq" (without quotes)
  3. Press Enter

这里唯一的问题是,发射的缺省编辑是<条码>vi<>/code>或<条码>vi,你对此不熟悉。 (作为快速提款,在不作任何改动的情况下退出该编辑,点击 Esc,几次,然后打:,,!;terEn)。

有几个办法可以设立你的违约编辑,而且你没有指出你重新使用哪一种操作系统,因此特别难以建议。 我建议使用:

 git config --global core.editor "name-of-your-editor"

... which sets a global git preference for a particular editor. Alternatively you can set the $EDITOR environment variable.

The command for commiting all changed files:

git commit -a -m  My commit comments 

-a = all edited files

-m = 下述示意图为评论。

这将致力于你们的当地运动/活动。 3. 如果你想在上述指挥类型之后,把改动推向一个高频服务器/遥控服务器:

git push

吉特霍·沙克塔()是很简单的手法。

我不知道你的系统环境,但看来,你对:

git commit

您的缺席编辑也已启用。 在最坏的情况下(就你而言),情况可能非常严峻:

如果你不知道如何放弃,使用:q。

If you have further problems, you could use

git commit -m  Type your commit message here 

它像所有的ed一样,已经是指数的一部分。 因此,只使用<代码>commit 指挥

git commit -m "My Commit Message"

看看你的信息,虽然我本能说,你可能不想把<条码>cache的档案列入你的台。 尤其是,如果在管理贵计划时,在飞机上修建一些东西。 如果是的话,请在您的档案中添加以下内容:

httpdocs/newsite/manifest/cache/*

专门使用“指数”编制承诺。 您可在您承诺之前添加并删除该指数的变化(在您的过去,你已经删除了<代码>git rm的约10份档案)。 当指数看上去时,可操作git commitments

通常这将向<代码>vim发射。 插入以下案文:i,<esc> 回到正常状态,到Z ,以节约和放弃(ZQ > 至 quit,无储蓄)。 voilà, 您的承诺

This happens when you do not include a message when you try to commit using:

git commit

它启用了编辑环境。 定点是打字<代码>:q!和打入。

它会把你带回终点站,而不承诺,确保再次尝试,这一时间传递的信息是:

git commit -m  Initial commit 

I faced the same problem , i resolved it by typing :q! then hit Enter And it resolved my problem After that run the the following command git commit -a -m "your comment here"

This should resolve your problem.

你们可以使用演播室视觉信息。 这是另一种做法。





相关问题
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 ...

热门标签