我对git很新,希望我不会做一些非常愚蠢的事情.我一直没有在Git中忽略文件的方式生活,最终我不小心将OS文件添加到我的存储库中.
我有一个新的git存储库git status,其中包括:
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .DS_Store
# README.markdown
nothing added to commit but untracked files present (use "git add" to track)
Run Code Online (Sandbox Code Playgroud)
运行git add .后跟git status产生:
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new …Run Code Online (Sandbox Code Playgroud) 是否可以在Rake中为命名空间添加别名?
我喜欢你可以如何别名任务:
task :commit => :c
Run Code Online (Sandbox Code Playgroud)
很想能够做到这样的事情:
namespace :git => :g
Run Code Online (Sandbox Code Playgroud) 我已经安装了开发人员工具.我可以通过Xcode编译代码,根据文档/ usr/bin/gcc&/ usr/bin/cc应该指向/usr/bin/gcc-4.0.我的系统(Snow Leopard)上不存在符号链接或gcc-4.0.我想做的就是在终端上编译一些C!我对这项任务的复杂程度感到惊讶.命令GCC不出所料地返回"gcc:command not found".
任何人都可以对此有所了解吗?
我得到了旧的熟悉的"致命错误:在不在对象上下文中时使用$ this" $this->test = 'test';在下面的类中引用:
class Example {
public $test;
public function index() {
$this->test = 'test';
}
}
Run Code Online (Sandbox Code Playgroud)
类方法通过调用call_user_func_array(array('example', 'index'), $params);.我只能假设call_user_func_array由于某种原因决定将索引方法称为静态例如example::index()?但是我还没有想到解决这个问题,奇怪的是我直到最近才遇到问题.