I'm using Git to version a series of binary files. They compress pretty well, but my central repos do not seem to be compressing when I push to them. They're eating up a decent amount of my quota, so I was looking to see if there was a way to force the remote repo to do a GC.
Is this possible? I'm working on Project Locker so I don't believe I have SSH access to go in and GC the …
我意外地这样做了:
$ git push origin :development
To git@xxxxx.com:yyyyy/projects/web.git
- [deleted] development
Run Code Online (Sandbox Code Playgroud)
我该如何撤消?我能做的第二件事是什么?
我提交了一些名称中包含':'和'"'字符的文件,这些文件在Windows上无效.当我尝试从Windows机器上git pull时,它会给我一个错误消息.
有没有办法在Windows机器上重命名这些文件?或者还有其他解决方法吗?
我想创建一个git存储库,并允许所有用户访问它.我尝试通过以下方式初始化它:
git init --shared=all
Run Code Online (Sandbox Code Playgroud)
但是,当我更改用户并执行操作时git status,我收到以下错误:
fatal: Unable to create '.git/index.lock': Permission denied
Run Code Online (Sandbox Code Playgroud)
这应该发生吗?我访问本地文件系统上的repo而不是SSH.
我们如何在每次推送时使用git更改版本(每个+1)?
例如我有一个2 php文件
libs/lib1.php
libs/lib2.php
Run Code Online (Sandbox Code Playgroud)
在每个标题上通常都有一些信息
/**
* LIB1.PHP
* this libs does something like this
* and that this is a doc for you
* @version 145
* @todo something todo
* @author DAMS
*/
/**
* LIB2.PHP
* this libs does something like this
* and that this is a doc for you
* @version 445
* @todo something todo
* @author DAMS
*/
Run Code Online (Sandbox Code Playgroud)
每次推送时我们可以搜索并添加+1版本吗?
我修改了我的分支中的一些文件并做了一个
git add --all
Run Code Online (Sandbox Code Playgroud)
但是这增加了一些我不打算为提交添加的文件.
所以我做了一个
git reset --soft HEAD~2 (instead of doing git reset HEAD)
Run Code Online (Sandbox Code Playgroud)
但之前的提交是由其他人提出的,它导致许多文件处于修改/添加/删除状态.有没有办法回到我看到的唯一变化是由我添加/修改的文件的阶段?既然我没有做出实际的提交,有没有办法让我的头回到主人而不会吹走我的变化?git pull导致合并冲突,因为我实际上没有提交我的更改.
谢谢!
我一直在试图找到一种方法来创建一个本地分支,它从我上传的上游仓库中的标签开始,并没有发现任何有用的东西.
我在本地主分支上有上游主服务器,但我不确定我需要做什么来分支上游标签.
我试过了:
git branch upstream/master tagname
git branch master tagname
git branch upstream tagname
Run Code Online (Sandbox Code Playgroud)
这些都没有奏效.谢谢.
我正在编写一个简单的预提交git钩子,用于更新提交的文件的版权标题中的年份.
在修改了具有版权的行之后,我希望钩子能够对该行进行分段,以使其成为提交的一部分.它不仅仅是git add整个文件,因为可能还有其他预先存在的更改,不应该进行上传.
我没有在git add手册中看到任何选项让你登台特定的行.
我想我可以git stash save --keep-index,应用我的更改,git add文件,然后git stash pop,但这似乎相当粗糙.有更好的方法吗?
是否有可能在Egit中执行"git revert"以通过创建新提交来回滚更改(而不是检查较旧的提交或执行硬重置,而不会创建新的提交以回滚更改)?
如果您有一个中央存储库,以防您需要撤消已经推送的更改,这似乎是一个重要的功能.
提前致谢!
git ×10
branch ×1
eclipse ×1
egit ×1
filepattern ×1
fork ×1
git-gc ×1
git-remote ×1
linux ×1
permissions ×1
post-update ×1
reset ×1
scripting ×1
windows ×1