用git推动未跟踪的内容 [英] Pushing untracked content with git

查看:120
本文介绍了用git推动未跟踪的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆图形(.jpg,.png,.tiff等)在git中有一个项目。图形扩展名位于我的.gitignore(这可以更改),因为我不需要对图形进行版本(负责图形的部门具有版本提示并跟踪它们自己对图形的更改)。但是,当我推送时,似乎只有被跟踪的内容才会进入存储库。我需要将图形与存储库一起推送,但我不想跟踪图形文件,我该怎么做(或甚至有可能)?

I have a project in git with a bunch of graphics (.jpg, .png, .tiff, etc). The graphics extensions are in my .gitignore (this can change) because I do not need to version the graphics (the department responsible for graphics has version cue and tracks their own changes to the graphics). However, when I push, it seems only the tracked content gets to the repository. I need the graphics to be pushed with the repository, but I do not want to track the graphics files, how would I do this (or is it even possible)?

推荐答案

您可以将文件添加到存储库,即使它们被忽略(匹配< .gitignore 中的模式)。

You can add files to repository even if they are ignored (match pattern in .gitignore).

你只能用git推送什么是 comitted ,所以你不能推送(使用git)未跟踪的文件。您可以使用其他mechanizm(如 rsync scp )(如果它位于其他服务器上)。

You can push with git only what is comitted, so you can't push (using git) untracked files. You can use other mechanizm like rsync or scp instead (if it is on other server).

这篇关于用git推动未跟踪的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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