Monday, August 27, 2012

GitHub for Dummies


GitHub is a free cloud based version control system. Its extremely powerful but at the same time is a little daunting to use for the first time.
Here is a small guide to easily use GitHub without much fuss! 
Step 1: Create an account on GitHub  (https://github.com/)
  If you are ok with your code being public then GitHub is free to use else it will cost you. 
  
Step 2:  Create a new repo or repository on GitHub. Name it test.
Step 3: Download GIT tools from the site and install. 
Step 4: In your working directory which you want to push to git do the following: 
git init  (initializes your local directory to be a git compliant directory)
git add *  (adds all files in current directory and sub directories to git local repo)
git commit -m "Initial Commit" (Commits all added files to local repo first)
git remote add origin https://github.com/USERNAME/REPONAME.git (add a remote git reference for github repo)
  Alternatively you can add
git remote add origin git@github.com:USERNAME/REPONAME.git
git push -u origin master (Push all the committed files which will be in master repo by default into the remote site you added called origin)
That's it done. Go online and see your code in all its glory!

After this for incremental updates just do this:
git add *
git commit -m "Updates"
git push -u origin master (This will add whatever was changed).

You can see what will be committed using git status command.

Thursday, July 14, 2011

How to Increase Memory for Android Emulator

This is an issue often faced when setting up the Android Emulator for the first time.
Usually it runs nicely for sometime and then starts giving INSTALL_FAILED_INSUFFICIENT_STORAGE error.

It does not depend on the application size also. Usually, if we restart the emulator the problem goes away but only temporarily. To properly solve this, we need to increase the emulator's memory size.

To do that follow this thread on stackoverflow.com here.