I created a new GitHub repo – I want to put my existing repo there.
I followed the instructions:
cd existing_git_repo
git remote add origin git@github.com:acme-org/myprj.git
git push origin master
This only pushes the master branch to GitHub.
How do I push everything (including all branches) in my existing repo to my new GitHub repo?
Note: git push –all won’t push your tags, only your branches.
would really push everything. See also “Set up git to pull and push all branches“.
Don’t forget the
--dry-runoption to make some test before actually pushing everything.See also GitHub help “Working with remotes” to set your origin to your GitHub remote repo.
As mentioned in “How to make “git push” include tags within a branch?“, git 1.8.3+ (May 2013) introduced:
That can help keeping that operation (pushing commits and tags) done with one command instead of two.
Git 2.4.1+ (Q2 2015) will introduce the option
push.followTags.