简体   繁体   English

Git在Windows上提交提交和bash

[英]Git post commit and bash on windows

I want to copy all the *.obj files (ignored by the git, but present in the directory) after commit to a directory. 我想在提交到目录后复制所有* .obj文件(被git忽略,但存在于目录中)。

With this script: 使用此脚本:

#!/bin/sh
pwd
branch=$(git rev-parse --symbolic --abbrev-ref HEAD)
echo logging objfiles for $branch
mkdir -p ./OBJ_$branch/
cp -u -f -r *.obj ./OBJ_$branch/

Git says after commit, that "Cannot stat *.obj" Git在提交后说,“无法统计* .obj”

Ia aware of different endlines and this file is saved using PSPad with linux endlines. 我知道不同的结尾行,并且此文件是使用PSPad和Linux结尾行保存的。

Thanks for any help! 谢谢你的帮助!

pwd prints the correct directory. pwd打印正确的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM