getting “fatal: not a git repository: '.'” when using post-update hook to execute 'git pull' on another repo

Here is the script that ultimately worked. I think the bit I was originally missing that prevented it from working remotely was the unset GIT_DIR

#!/bin/sh
cd /path/to/working-copy/ || exit
unset GIT_DIR
git pull repo branch

exec git-update-server-info

getting “fatal: not a git repository: '.'” when using post-update hook to execute 'git pull' on another repo

时间: 2024-12-14 20:54:19

getting “fatal: not a git repository: '.'” when using post-update hook to execute 'git pull' on another repo的相关文章

把Git Repository建到U盘上去(转)

把Git Repository建到U盘上去 转 把Git Repository建到U盘上去 Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具备神二代的气质和品质: 促进了生产力的发展,Git的分布式版本控制理念,并非首创,但非常适合开源社区的协作方式(不存在master-slave的关系) GitHub GitHub很好,号称代码界的facebook. facebook,twitter,Microsoft,vmware,redhat,LinkedIn,Yahoo等公司

How to Manage your GIT Repository Tutorial

GIT Repository Management This tutorial explains how to use GIT to create a project, add files, commit modifications and upload them in the remote repository at GitHub. First, you should generate an SSH key. You must have at least one SSH public key

【搭建git+maven+jenkins持续集成环境】[一] 搭建git服务器

使用的系统是ubuntu,所以有大量apt-get命令,哈哈见谅 安装git git-core 新建一个git用户,这个用户的主目录会用来存放Git Repository. 这个用户名并非一定要叫git,可以任意指定,只不过git是比较常用的,一看就知道这个账户的作用 修改下密码 登陆 sudo apt-get install git git-core adduser git passwd git su git 以上为git安装 获取gitolite 如果没有python安装python 安装p

git: fatal: Not a git repository (or any of the parent directories): .git

在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 切换到 提交历史 1a, $ git checkout 1a,出现error: fatal: Not a git repository (or any of the parent directories): .git 这个提示表明现在不在一个git repository目录下,需要切换到flask

解决:fatal: Not a git repository (or any of the parent directories): .git

fatal: Not a git repository (or any of the parent directories): .git 在用个git上传android项目时发现 git add file添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录,解决办法如下: 接着在下一行直接输入git init就可以了!

新目录下使用git管理,未配置.git目录,报错fatal: Not a git repository (or any of the parent directories): .git

fatal: Not a git repository (or any of the parent directories): .git 第一次用Git,遇到这个错误提示,原来是这样的: fatal: Not a git repository (or any of the parent directories): .git This tells you that the directory you're in is not a git repository. Before you can add

git 解决fatal: Not a git repository

我用 git remote add origin [email protected]:michaelliao/learngit.git 添加远程库时提示: fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录, 解决办法如下: 当时发现自己所在目录并非git初始化库目录,所以跳转到git库,重新运行ok;

git错误:fatal: Not a git repository (or any of the parent directories): .git

git错误:fatal: Not a git repository (or any of the parent directories): .git 我用git add file添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录,解决办法如下: git init就可以了!

repo sync出现“fatal: '../platform/abi/cpp.git' does not appear to be a git repository”的解决方案

在我下载Android源代码时,在最后一步调用repo sync,出现“fatal: '../platform/abi/cpp.git' does not appear to be a git repository”,后来在网上查了资料,参考http://zxquiet.iteye.com/blog/1470991和http://bbs.csdn.net/topics/380254094. 1.在存放android系统源代码的目录(也就是执行repo sync命令的目录)下,有个.repo的隐藏