Monday, October 1, 2012

Git: Clean up garbage

 git clean -d -fx ""

Friday, August 31, 2012

SVN: Cherry-Pick And Merge Between Bscenarioranches


Trunk has project at http://svn/repos/SampleProject/

Branch has project at http://svn/repos/SampleProject/hotfix/

We need a change at r2883 in trunk.


cd to the checked-out branch folder.

svn merge -r 2882:2883 ^/trunk/

Wednesday, May 9, 2012

Recursively delete .svn directories

Useful when you accidentally copied a folder that's under SVN control.

rm -rf `find . -type d -name .svn`

Tuesday, January 17, 2012

Remove a git submodule

  1. Delete the relevant line from the .gitmodules file.
  2. Delete the relevant section from .git/config.
  3. Run git rm --cached path_to_submodule (no trailing slash).
  4. Commit and delete the now untracked submodule files.

Wednesday, January 11, 2012

Update Git Submodules

// Check submodules
git submodule

For example, I want to update my RestKit submodule at the (project root)/RestKit/ folder, I do the following steps:

// Update RestKit
cd RestKit/
git fetch
git merge origin/master

// Commit/Push changes
cd ..
git add RestKit
git commit -m "..."
git push

Wednesday, November 16, 2011

Undo all changes in svn

svn revert --recursive .

Monday, May 24, 2010

How to format XML in command-line

xmllint --format %%%{PBXFilePath}%%%