English 中文(简体)
git-diff in another Chef
原标题:git-diff in another directory
  • 时间:2010-05-05 19:09:07
  •  标签:
  • git
  • zsh

目前,我撰写的只是一些z子功能,检查了我所有的宝库,看看它们是否继承,然后打印出需要承诺的储存。 至今,我已指出,显示清点清理/继承状况的最佳途径是<条码>git-diff和<条码>git-ls-files:

if ! git diff --quiet || git ls-files --others --exclude-standard; then
  state=":dirty"
fi

我对你们的民间人士有两个问题:

  1. Does anyone know of a quicker, more efficient way to check for file changes/additions in a git repo?
  2. I want my zsh function to be handed a file path (say ~/Code/git-repos/) and check all of the repositories in it. Is there a way to do without having to cd into each directory and run those commands? Something like git-diff --quiet --git-dir="~/Code/git-repos/..." would be fantastic.

感谢!

最佳回答

如果$DIR 持有您的名录,并附有标准格式(即<代码>.git dir is $DIR/.git),则<代码>git-git-dir$DIR/.gitwork-tree$DIR status -s -uno将列出所有未作改动的档案。 如果名单空洞,就应当给你希望的东西。

问题回答

暂无回答




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

热门标签