Custom Search

Thursday, January 9, 2014

How To Checkout From review.openstack.org And Push Changes Back Again For Review

1)
#git fetch ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient refs/changes/81/65381/2 && git checkout FETCH_HEAD -b test_branch
From ssh://review.openstack.org:29418/openstack/python-keystoneclient
 * branch            refs/changes/81/65381/2 -> FETCH_HEAD
Switched to a new branch 'test_branch'


2)
#git branch
  master
* test_branch

3)
#git remote -v
origin    https://github.com/openstack/python-keystoneclient.git (fetch)
origin    https://github.com/openstack/python-keystoneclient.git (push)

4)
#git review -s
Could not connect to gerrit.
Enter your gerrit username: sajuptpm
Trying again with ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient.git
Creating a git remote called "gerrit" that maps to:
    ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient.git

This repository is now set up for use with git-review.
You can set the default username for future repositories with:
  git config --global --add gitreview.username "sajuptpm"

5)
#git remote -v
gerrit    ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient.git (fetch)
gerrit    ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient.git (push)
origin    https://github.com/openstack/python-keystoneclient.git (fetch)
origin    https://github.com/openstack/python-keystoneclient.git (push)

6)
#git remote update
Fetching origin
Fetching gerrit

7)
#git branch
  master
* test_branch

8)
#git checkout master
Switched to branch 'master'

9)
#git branch
* master
  test_branch

10)
#git pull --ff-only origin master
From https://github.com/openstack/python-keystoneclient
 * branch            master     -> FETCH_HEAD
Already up-to-date.

11)
#git branch
* master
  test_branch

12)
#git remote -v
gerrit    ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient.git (fetch)
gerrit    ssh://sajuptpm@review.openstack.org:29418/openstack/python-keystoneclient.git (push)
origin    https://github.com/openstack/python-keystoneclient.git (fetch)
origin    https://github.com/openstack/python-keystoneclient.git (push)

13)
#git checkout test_branch
Switched to branch 'test_branch'

14)
#git branch
  master
* test_branch

15)
#git diff

16)
*See comment and diff of last commit
#git show

17)
Make your changes

18)
a)
*If you want to save your changes as new commit
#git commit -a

b)
*If you want to append your changes to last commit
#git commit --amend

19)
*Push your Changes to https://review.openstack.org
#git review

20)
Goto https://review.openstack.org

No comments:

Post a Comment