Using repo and git

From Omni
Revision as of 23:39, 16 January 2015 by Lj50036 (Talk | contribs) (Adding some basic git commands. More to come!!)

Jump to: navigation, search

Using Repo and basic Git commands

Please have a look at Google's official guide:

Basic Git commands

   git clone --Clone a repository into a new directory.
   git clone

The following commands will be ran from within the cloned repo's directory.

  • Pulls all the changes from upstream.
    git pull --Fetch from and integrate with another repository or a local branch.
  • Returns some basic info
   git-status --Show the working tree status.
  • Returns current branch
   git branch --List, create, or delete branches.
  • Switches branch that is currently being tracked.
   git-checkout --Checkout a branch or paths to the working tree.
   git checkout <branch>
   git checkout android-5.0
  • This is a very powerful, everyone should get familiar using it.
   gitk --The Git repository browser.


I'm getting "Permission denied" when trying to 'repo upload' a change

Make sure you have an username set on your gerrit account at

Then, make sure it is set properly in your git config by running the following command:

   git config --global <your username here>

Another thing to check is that you have added your SSH public key to Gerrit