This is limited to cloning 100 repos at a time, the second command gets page 2
TOKEN=foo
ORG_NAME=developer-journey
COMPANY=IBM
$ curl -s "https://github.ibm.com/api/v3/orgs/developer-journeys/repos?access_token=TOKEN&per_page=100" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
$ curl -s "https://github.ibm.com/api/v3/orgs/developer-journeys/repos?access_token=TOKEN&per_page=100&page=2" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
This will keep the commit history!
## get the repo to be cloned
$ git clone [email protected]:IBMDigital/Procurement-System.git
## rename the origin branch to something else to avoid conflicts
$ git remote rename origin destination
## go to github and create an empty repo, add the new repo location
$ git remote add origin https://github.com/IBM/procurement-system.git
## optionally check remotes using -v
$ git remote -v
destination [email protected]:IBMDigital/Procurement-System.git (fetch)
destination [email protected]:IBMDigital/Procurement-System.git (push)
origin https://github.com/IBM/procurement-system.git (fetch)
origin https://github.com/IBM/procurement-system.git (push)
## push code up to new remote branch
$ git push -u origin master
## note that if using the below command with 2FA, you will need to
## use a personal access token as a password along with your username!
- Click "Rebase" button in the Gerrit UI under your patch set.
- git review -d $PARENT_CHANGE_NUMBER
- git review -x $BROKEN_CHANGE_NUMBER
- fix the issues
- git add
- git cherry-pick --continue
- git review
- git checkout -b some_branch_name origin/stable/liberty
- git review -x <patch #>
- fix errors
- git add keystone/
- git cherry-pick --continue
- modify the commit message
- git review stable/liberty
- git reflog (to find the number)
- git reset --soft HEAD@{number}
- git commit -C HEAD@{number}