我有一个git子模块,它在git状态下不断显示“修改”,尽管我从未更新过它。
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or
今天就来看看AppHarbor。我的主要问题在标题中,但我还有其他与git + windows相关的问题。
首先,与相关。我喜欢这样的想法,即我可以为部署指定配置转换。我的问题是,它必须是Web.Release.config转换吗?实际上,我想通过使用它作为集成测试的qa部署来测试它。我是否可以将转换指定为使用Web.DeployToAppHarbor.config?
其次,我读过关于crlf问题的文章。当我运行git add .时,我应该得到所有这些消息吗?
warning: CRLF will be replaced by LF in [path].
The file will have
我有一个非常基本的github设置,其中包含一个自述文件、一个目录和另一个包含html文件的目录。在github上,我只能查看自述文件和first文件夹,但不能查看其中的任何内容,并且我收到以下消息
tc349 ryntc3$ git add *
tc349 ryntc3$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <
我最近重新组织了我的点文件,将其放在~/Dropbox/dotfiles的Git存储库中,并且我正在使用病原体在~/Dropbox/dotfiles/home/.vim/bundle中捆绑所有的Vim插件。这些插件是作为Git子模块添加的。
现在的问题是,当我运行Vim时,它会自动生成所有插件的文档,并将它们放入每个子模块目录中。这会将未跟踪的内容添加到子模块中,这是我想要避免的。
ruby-1.8.7-p330@gs ~/Dropbox/dotfiles ‹master*› $ git st
# On branch master
# Changed but not updated:
#
在我的一个由git监控的项目中,我从Github克隆了另一个回购项目。现在我注意到,在软件Github for Mac中,Subproject commit有一些变化。不知何故,git将克隆的目录称为一个文件,其中包含2行?
尝试提交更改会抛出错误。
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file&g
我正在尝试将我的数据推送到bitbucket存储库,并且我不断地得到一个错误:未为提交而进行的更改。
我使用git add .添加项目中的所有文件。
然后我使用git commit -m "..."
我仍然收到这个错误:
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
modified: src/modules/paypal (new commits)
no changes added t
即使在执行git添加-A之后,当我运行git状态时,也会得到以下结果:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or mod
我已经修改了之前在github上从它自己的存储库克隆的puppet模块。我唯一改变的就是一个配置文件模板,没什么大不了的(支持pgsql的pg_hba.conf.erb)。
问题是我无法将修改后的模块添加到我的存储库中。
[ngw@chienandalusia:~/outline.li]$ git status (08-13 15:18)
# On branch develop
# Changes not staged for commit:
# (use "git add <file>..." to update wha
目标是提交一个git分支。分支的"git状态“的输出是:
On branch zeromq_new
Your branch is up to date with 'origin/zeromq'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working dire
用submodule --remote更新子模块将引入子模块的头部,而不是包装git中记录的散列。但是,包装设备回购似乎会继续管理它们本身的杂凑,无谓地给自己的历史带来噪音。
例如,在一个submodule update --remote之后,包装项目中将引入一个更改,类似于:
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to di
背景
在Linux上使用Git 1.8.1.1。存储库如下所示:
master
book
子模块的创建方式如下:
$ cd /path/to/master
$ git submodule add https://user@bitbucket.org/user/repo.git book
book子模块是干净的:
$ cd /path/to/master/book/
$ git status
# On branch master
nothing to commit, working directory clean
问题
另一方面,主模块显示了book子模块的“新提交”:
$ cd /path
在下面的示例中,我想说明对Git子模块进行更改并在本地提交它会导致一种非常糟糕的情况,在这种情况下,我希望找到一个可行的解决方案(除了回答“伙计,不要使用Git子模块--它是邪恶的”)
例句
我首先创建了两个存储库:一个主项目及其子模块:
~ $ for r in main sub; do mkdir $r; cd $r; git init; cd ..; done
Initialized empty Git repository in ~/main/.git/
Initialized empty Git repository in ~/sub/.git/
让我们把一些内容放到子模块中:
~/
假设我想要从一个发布分支合并到主分支,并且在发布分支中有一些我不想包含在主分支中的提交。有没有办法进行合并,这样就不会合并其中的一个或多个提交?
到目前为止,我的策略是(在master中)执行以下操作:
git merge --no-commit release-branch
# Resolve conflicts and apply reverse patch of the commits that I don't want included
git commit # Edit commit message so that it lists the commits that have
我不能推送我对git子模块所做的更改。我已经推动了主项目,并得到了这个
mainProject$ git status
On branch myBranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the
我正在和node.js一起研究机器学习。对于不同的方法,有几个不同的项目,我想使用所有这些项目进行比较,因此我创建了一个父存储库,其中包含几个(目前有两个)子模块:“感知器”和“分类器”。这两个子模块是我从其他存储库创建的分支。
现在,当我在主机器学习项目中工作时,我有时对子模块中的代码进行轻微的修改。但是当我尝试提交我的更改(到我的fork)时,它不起作用:
erelsgl@erelsgl-H61MLC:~/git/machine-learning$ git commit -a
# On branch master
# Changes not staged for commit:
# (
我合并了两个分支。现在,当我尝试使用git add .时,命令会忽略一个文件夹。因此,我运行'git状态‘,这是显示在红色-’修改:管理‘。
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working d
我更改了一个git子模块的提交指针:
% git status
# On branch fix
# Your branch is behind 'origin/fix' by 1 commit, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to d
我有一些文件/文件夹不会离开Git暂存区?
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in sub
对git已经跟踪的文件进行更改后,我通常会执行以下操作:
git commit -a -m "a message describing what you did"
紧接着是
git push origin master
提交,然后将所有更改推送到我的Github帐户。但是,第一个命令不适用于已添加或删除的文件。要做到这一点,我必须首先输入:
git add -A
如前所述:。
在另一个问题中,公认的答案表明,应用完整提交(即:包括添加或删除的文件,而不仅仅是编辑的文件)的唯一方法是将它们与&&命令组合起来,如下所示:
git add -A &&