GIT新/修改/删除的文件列表 [英] GIT list of new/modified/deleted files

查看:144
本文介绍了GIT新/修改/删除的文件列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来得到所有新的/删除/修改的目录/文件在GIT的本地/远程存储库和对方的列表?

解决方案列出这些文件的最好方法是使用git status --porcelain

例如:
删除以前删除的文件:

/ p>

  git status --porcelain | awk'match($ 1,D){print $ 2}'| xargs git rm 


Is there a way to get the list of all new/deleted/modified directories/files in local/remote repository w.r.t each other in GIT ?

解决方案

The best way to list these file is using git status --porcelain

For example: To remove previously deleted files:

git status --porcelain | awk 'match($1, "D"){print $2}' | xargs git rm

这篇关于GIT新/修改/删除的文件列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆