To push your existing repo into different, you need to:
Clone the original repo first.
git clone https://git.fedorahosted.org/cgit/rhq/rhq.git
Push the cloned sources to your new repository:
cd rhqgit push https://github.com/user/example master:master
You may change master:master
into source:destination
branch.
If you want to push specific commit (branch), then do:
On the original repo, create and checkout a new branch:
git checkout -b new_branch
Choose and reset to the point which you want to start with:
git log # Find the interesting hashgit reset 4b62bdc9087bf33cc01d0462bf16bbf396369c81 --hard
Alternatively select the commit by
git cherry-pick
to append into existing HEAD.Then push to your new repo:
git push https://github.com/user/example new_branch:master
If you're rebasing, use
-f
for force push (not recommended). Rungit reflog
to see history of changes.