git submodule update –init –recursive hangs

By default, updating submodules doesn’t show progress. And since many Git repos will have a relatively slow download, this can cause the appearance of hanging (and it’s happened to me multiple times). To make sure this isn’t just a case of a large, slow download, run the update command with the –progress option. git submodule … Read more

how to detach alternates after git clone –reference?

Note that git clone now has a new –dissociate option that does this. It was added in Git 2.3: https://github.com/blog/1957-git-2-3-has-been-released The option simply calls git repack -a -d and deletes .git/objects/info/alternates. So yes, it is safe. (Source: https://github.com/gitster/git/commit/d35c8027937546e6b22a2f28123f731c84e3b380)

Cloning a record in rails, is it possible to clone associations and deep copy?

You may get some good use out of the Amoeba gem for ActiveRecord 3.2. It supports easy and automatic recursive duplication of has_one, has_many and has_and_belongs_to_many associations, field preprocessing and a highly flexible and powerful configuration DSL that can be applied both to the model and on the fly. be sure to check out the … Read more

Should we use clone or BeanUtils.copyProperties and why

Josh Bloch provides some fairly good arguments (including the one you provided) asserting that Cloneable is fundamentally flawed, favoring a copy constructor instead. See here. I haven’t yet encountered a practical use case for copying an immutable object. You’re copying objects for a specific reason, presumably to isolate some set of mutable objects into a … Read more

Clone specific branch from git

Try: git clone git@bitbucket.org:project/project.git -b develop_one –single-branch For already cloned repos use: git fetch git checkout develop_one # Or more specific: git checkout –track -b develop_one This will track the develop_one branch from the remote.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)